Try to import and add omero_figure app and static files#323
Draft
will-moore wants to merge 1 commit intoJaneliaSciComp:mainfrom
Draft
Try to import and add omero_figure app and static files#323will-moore wants to merge 1 commit intoJaneliaSciComp:mainfrom
will-moore wants to merge 1 commit intoJaneliaSciComp:mainfrom
Conversation
Member
|
I think this would be a great addition to Fileglancer! We'll take a look to see it could be best integrated and get back to your questions soon. By the way, I had just posted a question in the ome-zarr.js issues before seeing this. Nice timing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi - I'm not really proposing to merge these changes in, but I just wanted to start a discussion...
I've been experimenting with using Fileglancer as a back-end to OMERO.figure, which currently involves a bunch of changes in a branch of OMERO.figure at will-moore/omero-figure#6 and the smaller changes in this PR.
This comes off the back of work in progress that adds OME-Zarr support to OMERO.figure. This frees up the app from using OMERO.web as the backend. It's possible to use OMERO.figure as a pure static app, but it's much nicer to have a server for:
Figure_To_Pdf.pyscript that converts from the figure (saved as JSON) to the PDF (or TIFF) figureI haven't implemented the Opening and saving of local figure.json files yet, but the other stuff is kinda working (see PR above for my current dev set-up).
The main issues I want to ask about...
pip install omero-figure(which is not included with omero-web) then we set some config toomero_figuremodule to the list of Django apps. However, I'm not familiar with FastAPI and I couldn't work out if there's a way to do something equivalent? In the code below, I simply hard-code the import ofomero_figure, but maybe there's a nicer way of doing this?Figure_To_Pdf.py, the figure app POSTs tohttp://127.0.0.1:7878/omero-figure/export(with the figure.json and apath/to/save/figure.pdfand a background task runs the script and saves the pdf. The frontend app keeps pinging the file path location (using Fileglancer endpointhttp://127.0.0.1:7878/api/files/home?subpath=path/to/save/until it sees the file appear. However, if something goes wrong with the export script and it throws an error, I don't have anyway for the frontend to know about it, or get the error message. Do you know if FastAPI might provide some way to handle this?I'm really excited to allow non-OMERO users to use OMERO.figure for the first time (we may actually rename it to drop "OMERO") and I think that Fileglancer is going to be the best way for most of these users to adopt it. Would be great to hear what you think? Thanks.