Api experimenters groups#5315
Conversation
|
Closing until after #POTN and more complete... |
|
6aef59b to
24ad4e5
Compare
|
@jburel Could you remove the "exclude" label from this PR? Thanks |
…ap() In PR ome#5315 this now lazy loads group experimenters if unloaded
| if d.child.id.val != self.getUserId(): | ||
| yield ExperimenterWrapper(self, d.child) | ||
|
|
||
| def groupSummary(self, gid=None, exclude_self=False): |
There was a problem hiding this comment.
Seems that webtagging is still using this.
So I will leave it until webtagging has updated.
There was a problem hiding this comment.
Agreed, but removal of any method from omero.gateway should include a deprecation so if you foresee dropping it, perhaps add the deprecation now?
There was a problem hiding this comment.
It has been marked as deprecated for some time already. That's why I decided to remove it.
There was a problem hiding this comment.
Apologies, you're of course right. I had confused this with https://github.com/openmicroscopy/openmicroscopy/pull/5402/files#diff-5586c69038567a9c1960ae4f6d731278L509 where I convinced myself that the removal was less critical since it was in webclient
Since this is still being used by webtagging, wait till that has been updated before removing. This reverts commit b40e970.
|
API's tested and working well. Only concern, as noted by @will-moore, might be the ability of a public user being able to view experimenter and experimenter group data via the API (no authentication required to query the API). |
|
|
||
| Returns a tuple of (query, clauses, params). | ||
| Supported opts: 'group': <group_id> to filter by ExperimenterGroup | ||
| 'load_groups': <bool> to load ExperimenterGroups' |
| group. | ||
| Returns a tuple of (query, clauses, params). | ||
| Supported opts: 'experimenter': <experimenter_id> to filter by | ||
| ExperimenterGroup |
| Returns a tuple of (query, clauses, params). | ||
| Supported opts: 'experimenter': <experimenter_id> to filter by | ||
| ExperimenterGroup | ||
| 'load_experimenters': <bool> to load Experimenters' |
|
That is a serious concern |
|
Hmmm - let's discuss the |
|
It would be useful if a API definition itself (whether this one, or one introduced by third parties) could have some "awareness" of its critical nature so that the burden isn't externalized to the sysadmin to always have a regex set correctly. |
|
Re: discussion of also seen at: |
|
Need more discussion of experimenters/groups visibility for public & other users. |
What this PR does
Adds initial support for
/experimenters/and/experimentergroups/to the JSON API.This includes updating the
getQueryString()for the BlitzGateway ExperimenterWrapper and ExperimenterGroupWrapper classes, so that by default they load experimenters without groups and load groups without experimenters.Need to use the opts to load experimenters / groups (same as for Image 'load_pixels' etc).
In several places in webadmin we are using
conn.getObjects("ExperimenterGroup")to list groups (e.g. in the experimenter/new/ form) when we don't need toload_experimenters. Now that these are not being loaded, the loading time for that page is ~2 x faster for me.I've also updated the
group.copyGroupExperimenterMap()andexperimenter.copyGroupExperimenterMap()to lazy load if not previously loaded.This means that doing the following is slower because of lazy loading, but at least it won't fail
TODOs:
/experimenters/?omeName=willTesting this PR
/api/v0/m/experimenters/to list all.?group=3or with/api/v0/m/groups/3/experimenters/api/v0/m/experimentergroups/to list all.?experimenter=3or with/api/v0/m/experimenters/3/experimentergroups/api/v0/m/experimenters/3/or/api/v0/m/groups/3/Related reading
To discuss:
experimenterGroupsanywhere (urls, filters etc) or do we simply stick withgroups?cc @chris-allan @jburel