ome / omero-mapr

An OMERO.web app allowing to browse the data through attributes linked to the image
https://pypi.org/project/omero-mapr/
GNU Affero General Public License v3.0
5 stars 12 forks source link

Reactivate test-infra with 5.6.0-m2 #56

Closed joshmoore closed 4 years ago

joshmoore commented 4 years ago

Latest omero-web-docker image (5.6.0-m2-0) should allow imports.

joshmoore commented 4 years ago

Generally working again but is failing with:

>       raise NoReverseMatch(msg)
E       django.urls.exceptions.NoReverseMatch: Reverse for 'mapannotations_api_mapannotations' not found. 'mapannotations_api_mapannotations' is not a valid view function or pattern name.
/opt/omero/web/venv3/lib64/python3.6/site-packages/django/urls/resolvers.py:497: NoReverseMatch

cc: @will-moore

will-moore commented 4 years ago

I assume that omero-test-infra doesn't yet have https://github.com/ome/omero-web/pull/79 in it, so we could be missing failure to import urls.py. I can try and reproduce locally...

joshmoore commented 4 years ago

No, that makes sense. I'll look into getting a release that includes 79 and then bump omero-test-infra.

joshmoore commented 4 years ago

@will-moore : still failing with 5.6.0-m3 which includes 5.6.0.dev6 which includes PR 76.

will-moore commented 4 years ago

Running .omero/docker app locally, if I try to from . import urls in omero_mapr.__init__ I get:

+ python setup.py sdist
Traceback (most recent call last):
  File "setup.py", line 38, in <module>
    version = __import__('omero_mapr').get_version()
  File "/omero-mapr/omero_mapr/__init__.py", line 27, in <module>
    from . import urls
  File "/omero-mapr/omero_mapr/urls.py", line 23, in <module>
    from . import views
  File "/omero-mapr/omero_mapr/views.py", line 25, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Looking at the setup.py, the install_requires tries to read from requirements.py which does list requests as a dependency.

I don't see any of sign of it being installed in the travis or local console output, but then I also don't see the install of other omero-mapr dependencies, so don't know what's being installed?

joshmoore commented 4 years ago

See gh-57 for further discussion. In my testing, this sufficed to show the problem:

pip install .
export DJANGO_SETTINGS_MODULE=omeroweb.settings
python -c "import omero_mapr.urls"
joshmoore commented 4 years ago

Next error is:

(venv3) bash-4.2$ python -c "import omero_mapr.urls"
ERROR:omeroweb.webgateway.views:No numpy installed

I've added a commit after which the import test above fails, even though test-infra is still failing.

(Commit force pushed away after https://github.com/ome/omero-mapr/pull/56#issuecomment-559617196)

joshmoore commented 4 years ago
(venv3) bash-4.2$ pip freeze | grep omero-web
You are using pip version 9.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
omero-web==5.6.dev4

I imagine we're missing a bump elsewhere to have this working properly.

manics commented 4 years ago

OMERO.web isn't pinned in the ansible role (there's no released version on pypi so it will pip install the latest dev release), so rebuilding the docker image would also work. Though there are several updates to the role so probably good to bump it anyway.

joshmoore commented 4 years ago

It was pinned in https://github.com/ome/ansible-role-omero-web/pull/26/commits/283b8532706a7b880fc987a4cd575dfea99b94e2 though.

will-moore commented 4 years ago

omeroweb.webgateway.views.py tries to import numpy to support masks but it is not essential. The Error is just a message in:

try:
    import numpy
    numpyInstalled = True
except ImportError:
    logger.error('No numpy installed')
    numpyInstalled = False
joshmoore commented 4 years ago

Force-pushed away the addition of numpy to requirements.txt in https://github.com/ome/omero-mapr/commit/328c51ef73918ae0b200f300bf4afa086e1a45eb, triggering another travis build with the new docker images (5.6.0-m3-1)

joshmoore commented 4 years ago

Unfortunately, still failing with 5.6.0.dev6. Passing back to @will-moore.

will-moore commented 4 years ago

This can be closed now that https://github.com/ome/omero-mapr/pull/58 is in?

joshmoore commented 4 years ago

Sure. If any of the other issues that were tackled here show up, we can always resurrect.