Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config property for passing environment variables (see #395) #396

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshmoore
Copy link
Member

Rather than needing to update omero-py each time a new env variable needs passing to a script, this adds the

omero.processor.env_vars

property which can be updated. Likely needs more discussion since possibly this should be an "additional" list.

Rather than needing to update omero-py each time a new env
variable needs passing to a script, this adds the

```
omero.processor.env_vars
```

property which can be updated. Likely needs more discussion
since possibly this should be an "additional" list.
@will-moore
Copy link
Member

Couple of tests failing: e.g.

  _________________________ TestProcess.testEnvironment2 _________________________
  [gw1] linux -- Python 3.10.13 /home/runner/work/omero-py/omero-py/.tox/py310/bin/python
  
  self = <test_processor.TestProcess object at 0x7fd4d746e560>
  
      def testEnvironment2(self):
  >       omero.processor.ProcessI(self.ctx, sys.executable,
                                   self.props(), self.params())
  
  test/unit/scriptstest/test_processor.py:137: 
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  .tox/py310/lib/python3.10/site-packages/omero/processor.py:141: in __init__
      self.make_env()
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  
  self = object #0 (::omero::grid::Process)
  {
  }
  
      def make_env(self):
  >       variables = self.ctx.get("omero.process.env_vars", None)
  E       AttributeError: 'ServerContext' object has no attribute 'get'
  
  .tox/py310/lib/python3.10/site-packages/omero/processor.py:150: AttributeError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants