Add Figure_To_Pdf script to Docker image and update workflows#104
Add Figure_To_Pdf script to Docker image and update workflows#104neon-ninja wants to merge 5 commits intoome:masterfrom
Conversation
Co-authored-by: neon-ninja <3378822+neon-ninja@users.noreply.github.com>
…list Co-authored-by: neon-ninja <3378822+neon-ninja@users.noreply.github.com>
…ript Add omero-figure Figure_To_Pdf.py script to Docker image
There was a problem hiding this comment.
Pull request overview
This PR integrates the OMERO Figure Figure_To_Pdf.py script into the built Docker image and extends the existing smoke-test suite to verify the script is registered/visible via omero script list. It also enables manual triggering of the CI workflow.
Changes:
- Download and install
Figure_To_Pdf.pyinto the OMERO server scripts directory during Docker image build. - Add
test_figure_script.shand invoke it fromtest.shto validate script availability. - Enable GitHub Actions manual runs via
workflow_dispatch.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
Dockerfile |
Downloads Figure_To_Pdf.py into $OMERODIR/lib/scripts/... during image build. |
test_figure_script.sh |
New test that checks omero script list output for Figure_To_Pdf.py. |
test.sh |
Runs the new figure-script test as part of the smoke test suite. |
.github/workflows/main.yml |
Adds workflow_dispatch to allow manual workflow execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| script_list=$(docker exec $PREFIX-server $OMERO -s $SERVER -u $OMERO_USER -w $OMERO_PASS script list) | ||
| echo "$script_list" | ||
|
|
||
| if echo "$script_list" | grep -q "Figure_To_Pdf.py"; then |
| OMERO=/opt/omero/server/venv3/bin/omero | ||
| SERVER="localhost:4064" | ||
|
|
||
| script_list=$(docker exec $PREFIX-server $OMERO -s $SERVER -u $OMERO_USER -w $OMERO_PASS script list) |
| ARG OMERO_FIGURE_VERSION=v7.4.1 | ||
| RUN mkdir -p $OMERODIR/lib/scripts/omero/figure_scripts && \ | ||
| curl -fsSL -o $OMERODIR/lib/scripts/omero/figure_scripts/Figure_To_Pdf.py \ | ||
| https://raw.githubusercontent.com/ome/omero-figure/$OMERO_FIGURE_VERSION/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py |
|
Hi @neon-ninja - Thanks for the PR. We have tried to improve the situation by providing a one-click button in the OMERO.figure app that allows Admins to upload the script from within the web app itself, ensuring that the server has the exact right version. I guess that if we always had the latest version of the script on the server, we could teach the web app to only complain (show a warning message) if the script version was older than the app version. But that would also add the burden of making sure that each new version of the script would work with older versions of the web app. |
| RUN dnf -y clean all | ||
| RUN rm -fr /var/cache | ||
|
|
||
| ARG OMERO_FIGURE_VERSION=v7.4.1 |
There was a problem hiding this comment.
Thank you for this @neon-ninja
Yes, but this ^^^ hard-coding will imho cause that at a next release of omero-figure (which is not dependent on releases of omero-server, neither it is dependent on releases of omero-web), for example v7.4.2, the Figure_To_Pdf.py will not be matching the latest released version of omero-figure (7.4.2 which will be the latest agains hard-coded 7.4.1). Do I get this right ?
@neon-ninja It is understandable imho to assume that when any app of omero-web (such as omero-figure) is released, then this docker image is being updated. But, in truth, this is not so.
This pull request introduces support for the
Figure_To_Pdf.pyscript from the OMERO Figure project, ensuring it is included in the build and verified during testing. Additionally, it enables manual workflow dispatch in GitHub Actions. The main changes are grouped below:OMERO Figure script integration:
Dockerfilenow downloads theFigure_To_Pdf.pyscript from the specified OMERO Figure release and places it in the appropriate directory for use.test_figure_script.sh, is added to verify thatFigure_To_Pdf.pyis available in the OMERO scripts list.test.sh, is updated to run the newtest_figure_script.shas part of the test suite.CI/CD improvements:
main.yml) is updated to support manual triggering viaworkflow_dispatch.The dependencies for
Figure_To_Pdf.pywere already included in https://github.com/ome/omero-server-docker/pull/71/changes