Skip to content

Improve workflow-to-tools#230

Merged
bgruening merged 12 commits intogalaxyproject:masterfrom
lldelisle:improve_generate_tool_list_from_ga
Feb 3, 2026
Merged

Improve workflow-to-tools#230
bgruening merged 12 commits intogalaxyproject:masterfrom
lldelisle:improve_generate_tool_list_from_ga

Conversation

@lldelisle
Copy link
Copy Markdown
Contributor

Finally solve #206

I hope this will make some admins happy...

This PR improves workflow-to-tools:

  • remove duplicated tools (due to the deletion of item while looping through it, some items were not seen and stayed duplicated. I solved it with a while loop that make sure that there was no modification to the tool list before returning the final deduplicated tool list).
  • in addition to the default tool_panel_section_label, users can now provide a json that specifies a tool_panel_section_label. You can for example reuse the work done by @hexylena for the GTN by using https://training.galaxyproject.org/api/toolcats.json (@hexylena you know how much I am a fan).

Dear reviewers, feel free to change the name of the parameters I used.

@lldelisle
Copy link
Copy Markdown
Contributor Author

Here is the error I get with the test under 3.9:

ImportError while loading conftest '/home/runner/work/ephemeris/ephemeris/tests/conftest.py'.
tests/conftest.py:6: in <module>
    from galaxy_test.driver.driver_util import GalaxyTestDriver
.tox/py39-pytest/lib/python3.9/site-packages/galaxy_test/driver/driver_util.py:45: in <module>
    from galaxy.webapps.galaxy.fast_app import initialize_fast_app as init_galaxy_fast_app
.tox/py39-pytest/lib/python3.9/site-packages/galaxy/webapps/galaxy/fast_app.py:24: in <module>
    from galaxy.webapps.openapi.utils import get_openapi
.tox/py39-pytest/lib/python3.9/site-packages/galaxy/webapps/openapi/utils.py:16: in <module>
    from fastapi._compat import (
E   ImportError: cannot import name 'GenerateJsonSchema' from 'fastapi._compat' (/home/runner/work/ephemeris/ephemeris/.tox/py39-pytest/lib/python3.9/site-packages/fastapi/_compat/__init__.py)
An error occurred: module 'importlib.metadata' has no attribute 'packages_distributions'
py39-pytest: exit 4 (10.45 seconds) /home/runner/work/ephemeris/ephemeris> pytest -v --cov=/home/runner/work/ephemeris/ephemeris/.tox/py39-pytest/lib/python3.9/site-packages/ephemeris --cov-report xml tests pid=2524
  py39-pytest: FAIL code 4 (74.74=setup[64.29]+cmd[10.45] seconds)
  evaluation failed :( (74.79 seconds)

@nsoranzo
Copy link
Copy Markdown
Member

You can try to bump the minimum Python version to 3.10, 3.9 is EOL.

@nsoranzo
Copy link
Copy Markdown
Member

For "3.10, pytest" we are hitting the issue fixed by galaxyproject/galaxy@31720da , which is only in Galaxy dev currently (future galaxy-files 26.0).

@nsoranzo
Copy link
Copy Markdown
Member

Thanks for the code cleanups!

@lldelisle
Copy link
Copy Markdown
Contributor Author

Should we pin pydantic? Or leave it with a bug...

@nsoranzo
Copy link
Copy Markdown
Member

It may be worth to backport the one-line fix to 25.1 and release a new galaxy-files 25.1.1 package. @mvdbeek thoughts?

@martenson
Copy link
Copy Markdown
Member

Let's move this forward with a pydantic pin if that is sufficient?

@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Feb 3, 2026

pydantic pin is problematic, that's a widely used dependency we use in planemo, where we also use ephemeris. Let's just backport the fix.

@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Feb 3, 2026

I see, the backport has happened already -- galaxyproject/galaxy#21518. I can create a new release.

Comment thread requirements.txt Outdated
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
@bgruening bgruening merged commit 952f803 into galaxyproject:master Feb 3, 2026
6 of 7 checks passed
@lldelisle
Copy link
Copy Markdown
Contributor Author

The error in the test is always the same while it is using 25.1.1...

@nsoranzo
Copy link
Copy Markdown
Member

nsoranzo commented Feb 4, 2026

Yep, 25.1.1 only fixed the pydantic error you had in commit a8bdd7c , now we are back to a FastAPI breaking change.

@nsoranzo
Copy link
Copy Markdown
Member

nsoranzo commented Feb 4, 2026

Also I just noticed the py312-tests don't actually run any tests, tox.ini needs a rewrite.

@lldelisle
Copy link
Copy Markdown
Contributor Author

For tox.ini should I simply copy paste what is in py310-pytest and put it with py312-pytest?

@nsoranzo
Copy link
Copy Markdown
Member

nsoranzo commented Feb 4, 2026

For tox.ini should I simply copy paste what is in py310-pytest and put it with py312-pytest?

I'm on it, I'll tag you for a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants