ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
22 stars 32 forks source link

Handle getObjects(attributes={id:ID} as long #100

Closed will-moore closed 4 years ago

will-moore commented 5 years ago

Fixes many 'show' tests, which use getObjects('Image', attributes={'id':1}) We handle id to wrap in rlong. E.g: - https://py3-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/37/testReport/OmeroWeb.test.integration.test_show/TestShow/test_project_legacy_path/

will-moore commented 5 years ago

Those commits caused failure at https://py3-ci.openmicroscopy.org/jenkins/job/OMERO-test-integration/48/testReport/OmeroPy.test.integration.gatewaytest.test_get_objects/TestFindObject/testFindAnnotation/

joshmoore commented 5 years ago

Then omero_type is doing something more. wrapper(1) gives you an omero.RLong. How would you convert that to whatever has an OMERO_CLASS?

will-moore commented 5 years ago

This was failing:

>                   if wrapper.OMERO_CLASS is not None:
E                   AttributeError: 'function' object has no attribute 'OMERO_CLASS'

because getObject("Annotation") has an abstract AnnotationWrapper class. It should be fixed by my last commit above, which only uses the new behaviour when needed (when we need to distinguish between rint and rlong)

will-moore commented 5 years ago

NB: I still had to handle id on it's own since id is not included in the _field_info.