-
Notifications
You must be signed in to change notification settings - Fork 104
Display bulk annotations in web image viewer, new webgateway API calls #512
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
Conversation
|
Conflicting PR. Removed from build OMERO-merge-4.4#77. See the console output for more details. |
|
Conflicting PR. Removed from build OMERO-merge-4.4#78. See the console output for more details. |
|
@knabar / @chris-allan, I've labelled this "Conflict" to shut snoopy up . |
|
@joshmoore / @chris-allan I modified my webgateway/urls.py, so the conflict with PR 491 should be gone. |
|
Label removed. |
|
Annotation visible in Full Viewer. ROIs visible as well. Works. Ready to merge. |
|
It's possible to get this server error for the json call (not all annotations have namespace): |
|
I'm concerned about the mapping between the url and the iQuery construction. E.g. this works OK but this gives me when I should really get a 404. In fact, it seems strange that I need uppercase "Plate" but lowercase "wells". Can't we simply specify the urls we need via the urls regex, or at least in the first few lines of views.py code, raising a 404 if we don't get something that is supported. We can also handle any conversion here if needed, "plate" -> "Plate" etc. |
|
Hi Andreas, I wonder if you could try using 4 spaces instead of tabs in your html / javascript editing (you're doing this fine in Python). With a mix of spaces and tabs, the indentation is looking kinda strange, both in github's diff and in my TextMate, which makes it a little hard to work out what's going on. |
|
Apologies for the tabs, I'll double-check my editor settings. I'll add a check for annotations without namespaces. The reason it's uppercase Plate but lowercase wells is that the code just takes the terms from the URL into the query. The first term is the object type to find (which must be uppercase), all following terms are names of properties of that object (lowercase in this example, but I guess could be anything, whatever the property is). What probably should happen is better error-checking and a 404 if the query resulting from the given URL is invalid. |
|
@knabar Understood: I know this seems really picky, but I think the urls could be made a little cleaner:
|
|
@will-moore I made the suggested changes to PR 512 |
|
Great, thanks for that. A couple of minor comments: I would prefer the javascript within Also, if you happen to open an Image from a Plate with NO annotations on it, the json gives a 404 with even though Plate 596 does exist. This is because your query is relying on there being annotations. If you added then you would still retrieve a Plate with no annotations and you would instead get the 'correct' message "Could not retrieve single bulk annotations table" However, this is really splitting hairs because the outcome is the same, so not a blocker to merging. |
|
@will-moore Sorry about the indentation issue, it happened when I replaced the tabs with spaces and I missed it. I added the left outer joins, thanks for catching that. Misleading error messages are horrible. |
|
The metadata isn't displayed if the populate_metadata.py script has been run twice on the same plate (works in Insight). |
|
@knabar Those last commits are great. One question: The test scenario that I was given by @pwalczysko included the display of bulk annotations when the table was attached to the Screen (as well as the Plate). But your code doesn't support this, right? @manics's point about multiple bulk_annotations per Plate: I think you can just pick the most recent (highest ID) until we decide how to fully support this, E.g. |
|
@knabar, @will-moore, @manics: All displayed in insight. I will check the order in place. I will probably sort by id in that case. |
|
@will-moore Right now the Javascript only pulls in annotations for the plate into the image viewer. It should be easy to also query the screen and display annotations attached to it. |
|
@knabar I think you'll need a custom query for "Screen.plate.well" since I don't think your current query-builder will parse this right. But I think that should be done in a different PR. This current PR is ready to merge now. |
|
Ready to be rebased onto develop then, @knabar. Merging. |
|
@will-moore, @hflynn, @gusferguson, @pwalczysko, @jburel -- what's needed in the way of screenshots & docs? |
Display bulk annotations in web image viewer, new webgateway API calls
|
@knabar, @joshmoore, @will-moore: doc/scenario ticket https://trac.openmicroscopy.org.uk/ome/ticket/10048 |
No description provided.