Conversation
movestill
left a comment
There was a problem hiding this comment.
f string comment is an optional change. Please specify which corner of the cuboids are returned in the docstring.
intern/service/boss/baseversion.py
Outdated
| if url_prefix is None or url_prefix == '': | ||
| raise RuntimeError('url_prefix required.') | ||
|
|
||
| url = (url_prefix + '/' + self.version + '/cuboidsfromid/' + |
There was a problem hiding this comment.
Now that we're only supporting modern Python versions 🥳, you could switch to an f string which I think would look nicer.
| def get_cuboids_from_id(self, resource, resolution, id): | ||
| """Get corners for cuboids that belong to a specific ID. | ||
|
|
||
| All returned corners are cuboid aligned. |
There was a problem hiding this comment.
I think we should say which corner is returned. IIRC, it's the corner closest to the origin?
intern/remote/remote.py
Outdated
| id (int): Id of object of interest. | ||
|
|
||
| Returns: | ||
| (dict): {'cuboids': [[512, 512, 64], [0, 512, 32], [512, 512, 32], [0, 512, 48]]} |
There was a problem hiding this comment.
Looks good, just update the returns comment to match the new comments for get_cuboids_from_id().
|
@dxenes1 can we merge this? |
Still waiting for the changes to be merged in BossDB backend, but after that it should be good |
|
Updated docs and published this PR as ready for review (and merge) |
Adds remote function for the
cuboidsfromidapi in bossDB. It is now possible to get a list of cuboids that belong to a specific annotation ID. Remote syntax is as follows: