Enable package-centric development with uv#21016
Closed
jmchilton wants to merge 7 commits intogalaxyproject:devfrom
Closed
Enable package-centric development with uv#21016jmchilton wants to merge 7 commits intogalaxyproject:devfrom
jmchilton wants to merge 7 commits intogalaxyproject:devfrom
Conversation
This was referenced Oct 12, 2025
Member
|
I think most of the changes in this PR have already been merged as part of #21102 . |
Member
Author
|
@nsoranzo Indeed and some bug fixes I found by actually using this mode of development more and for more packages - thank you! |
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.
A current problem with isolated Python packages view of Galaxy is that in order to setup a virtual environment that uses a package - you'd need to manually walk the informal dag and setup each dependent package manually. I think this can be solved with UV workspaces and then we can have standalone simple targets to set this all up for individual package development automatically and in my hands very rapidly.
This should in turn let us point an AI coding agent at an individual package and give it free reign to lint, type, and test code the rapidly and isolation without needing to consider the broader application's structure or dealing with dependencies in an ad hoc manner. The advantages of pointing AI agents at smaller directories is I think huge - the smaller the context you give these agents the more efficiently and effectively they can write code.
See the README.md added for user facing details. I think this formalizes the treatment of dependencies between our packages when using
uv(uv workspaces specifically). This does introduce a bit of redundancy because the packages cannot share a pyproject.toml - but I've written a script to synchronize these from a common template so I think this is a non-issue. Longer term this should probably be inverted and pyproject.toml should be the source of truth and setup.cfg dropped. I've changed test requirements into a new set of extras instead of managing them externally in a test-requirements.txt - this is so uv can see them automatically.I think this might also negate the need to track the dag and allow us to do better isolated testing of the packages if we rewrite tests.sh - but that feels like a round 2 sort of thing.
The above paradigm demonstrates how to run tests in isolation now but I've added Makefile targets and docs for doing that as well as for linting with ruff and running mypy. I wasn't able to get formatting working with black - the problem is this line https://github.com/psf/black/blob/main/src/black/__init__.py#L763 - black won't format symlinks outside of root and I don't see a way in their codebase to bypass this.
How to test the changes?
(Select all options that apply)
License