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
Export figure without script #240
Conversation
407b1b2
to
cb79322
Compare
d505a8a
to
f89731f
Compare
1397fd9
to
b0e81cf
Compare
omego | ||
reportlab |
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.
any cap for the version of reportlab and markdown?
I remember us having issue with some version and numpy.
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.
I just copied these over from requirements-server.txt
.
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.
since we were using yum install python-reportlab
for example to install the dependency on the server and not pip
, the version installed via pip
will be more recent so we will need to watch for potential issues
requirements-server
was never used.
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.
you will need to remove omego
What about the font for legend? |
Good catch! Fonts added. |
Running this on |
requirements are not installed |
https://ci.openmicroscopy.org/view/Failing/job/WEB-DEV-trial-deploy/405/console
|
@chris-allan points out that long-running http requests are going to cause problems tying up workers. |
I'm not 100% clear on what the goal was here but if the main reason was to improve dependency management and aid installability I don't see a reason not to continue this PR. Having all the dependencies in a requirements file with setuptools integration is certainly in keeping with all our other work. As is having the export code itself available as a module. The trend is to have OMERO.web plugins be installable via |
A potential next time to examine this is when the MQ is in place. If the mechanism for registering a new job type is also pip installable, then we can free ourselves from the script dependency. cc: @c0c0n3 |
Copying the script is one step. |
Can figure still be run standalone e.g. on a different machine to OMERO.web? If so I think there's value in this, e.g. if we wanted to add figure to the IDR we wouldn't want to run scripts on the OMERO.server backend, but we could install figure on an isolated VM so the impact of long-running requests would be isolated to just figure users. |
Figure is just an OMERO.web plugin; so yes, of course it can. That is provided you are using Redis backed sessions and have both OMERO.web instances configured to use the same Redis server instance. You would then need to set up the correct redirects and/or transparent proxying in nginx. This deployment strategy is exactly how the microservice integration is currently documented. |
As discussed with @jburel - We could add the Figure_To_Pdf.py script to the OMERO scripts so it will always be on the server. The export functionality could go in a separate pip-installable package that is used by the script or other python code. The script wouldn't have to updated/released unless the inputs/outputs change. |
Long term it'd be ideal if we had a scripting/processing service that's independent of OMERO, then you'd be able to run figure on a standalone OMERO.web against a public/read-only OMERO.server. Or make the Figure_To_Pdf.py script into a micro-service. |
Export Figures without scripting service
Install now doesn't require any server-side script or dependencies.
Figure export to TIFF/PDF/zip or OMERO image happens during a single AJAX POST request (attaching files to images as before) and JSON returns IDs etc to enable download / link.
Instead of writing images and files to disk (as in the script) we now read/write to file objects or use a temp dir to compile contents of zip file.
To test: Needs to fully test figure export:
TODO: