-
Notifications
You must be signed in to change notification settings - Fork 100
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
Delete and create bulk-map-annotations by namespace #5074
Conversation
The new test method requires a clean environment for each test method, but this seems to break the existing test methods.
6022cfe
to
c006b16
Compare
@@ -59,6 +59,8 @@ | |||
from pytest import mark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./components/tools/OmeroPy/test/integration/metadata/test_populate.py:58:1: F401 'skip' imported but unused
could you please fix travis? I will test it tomorrow then |
|
||
log.info("Total: %d MapAnnotation(s) in %s", | ||
len(set(self.mapannids)), nss) | ||
log.info("Total: [%s] MapAnnotationLink(s) in %s", self.mapannids, nss) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INFO:omero.util.populate_metadata:Total: [{'Image'... 8385632L])}] MapAnnotationLink(s) in [u'openmicroscopy.org/mapr/gene']
could this say also size please?
maybe size in info and actual dict in --report?
@@ -1605,10 +1631,14 @@ def _write_to_omero_batch(self, to_delete, loops=10, ms=500): | |||
# an exception has been thrown (likely LockTimeout) | |||
rsp = callback.getResponse() | |||
if isinstance(rsp, omero.cmd.OK): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may never reach the logger because:
rsp <class 'omero.cmd.Delete2Response'> object #0 (::omero::cmd::Delete2Response)
{
deletedObjects =
{
key = ome.model.annotations.WellAnnotationLink
value =
{
[0] = 8371438
}
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete2Response
subclasses OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes the problem is in
ndal = len(rsp.deletedObjects.get(
"ome.model.annotations.AnnotationLink", []))
there is no ome.model.annotations.AnnotationLink
Tested with snoopycrimecop/idr-metadata@5978294 diff after upgrade
to be deleted manually otherwise mapr will pick them up in metadata panel. |
FYI if it helps with testing the latest commits, in |
Now run on demo33 (next production). The performance issue will be addressed in follow-ups. |
--rebased-to #5246 |
What this PR does
Adds infrastructure and tests for creating and deleting bulk-map-annotations with a namespace limit. At the moment I've added an extensible way of passing additional parameters, but I haven't added a dedicated CLI flag.
--depends-on #5068
Todo:
Testing this PR
Run the integration tests
Run
omero metadata populate ... --localcfg <cfg>
where<cfg>
is something that can be read byomero.utils.pydict_text_utils
. For example, to limit by namespace any of the following should work:--localcfg localcfg.yml
or--localcfg OriginalFile:123
:--localcfg localcfg.json
or--localcfg OriginalFile:123
:--localcfg '{"ns":"openmicroscopy/mapr/gene"}'
Related reading