ome / omero-web

Django-based OMERO.web client
https://www.openmicroscopy.org/omero
16 stars 30 forks source link

If OMERODIR is set but etc/grid is missing do not use ~/omero/config.xml #58

Open manics opened 4 years ago

manics commented 4 years ago

If OMERODIR is set but etc/grid is missing do not use ~/omero/config.xml

Using

      - omero-py==5.6.dev2
      - omero-web==5.6.dev3
$ OMERODIR=/opt/omero/web/OMERO.web/ /opt/omero/web/venv3/bin/omero config get

/opt/omero/web/OMERO.web/etc/grid not found; using /opt/omero/web/omero/config.xml

This should be an error since OMERODIR is specified, otherwise there is likely to be a lot of confusion over which etc/grid file is used.

manics commented 4 years ago

Arguably failing to set OMERODIR when a config.xml is required should always be an error. This is likely to be a source of confusion for anyone manually setting up a decoupled server (and we can expect loads of forum posts in response):

Is there a use-case for requiring config.xml when not running a server (OMERO.server or OMERO.web)? Otherwise could we always return an error if OMERODIR isn't set?

joshmoore commented 4 years ago

I'm pretty sure that the ~/omero/config.xml functionality was never used. I do wonder if $PWD might be a useful default, but otherwise, :+1: (This is likely a PR against omero-py though)