[MAINT] use uv & tox, drop python 3.9#262
Open
Remi-Gau wants to merge 7 commits intocpp-lln-lab:mainfrom
Open
Conversation
Reviewer's GuideSwitches the project to uv for dependency management and tox-uv based workflows, simplifying dependency specification, aligning supported Python versions and CI/Docker images, and adding a uv lockfile. Flow diagram for dependency management with uv and tox-uvflowchart TD
A[Edit pyproject_toml] --> B[Compile dependencies with uv<br>uv pip compile pyproject.toml -o requirements.txt --python-version 3_11_15 --no-deps]
B --> C[Generate requirements_txt]
B --> D[Generate uv_lock]
subgraph Local_Testing
E[Run tox -e test]
E --> F[tox_uv resolves dependency_groups test]
F --> G[Install test dependencies via uv]
G --> H[Run pytest with coverage]
end
subgraph Linting
I[Run tox -e lint]
I --> J[Install pre_commit]
J --> K[Run pre_commit hooks]
end
subgraph CI_Pipeline
L[GitHub Actions test_and_coverage]
L --> M[Use tox with tox_uv]
M --> N[Install deps via uv using uv_lock]
N --> O[Run tests and generate coverage]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Removing the existing
[project.optional-dependencies]extras ([dev],[doc],[docs],[style],[test],[tests]) is a breaking change for consumers that installbidsmreye[...]; consider reintroducing these extras and mapping them to the new[dependency-groups]so external workflows keep working while you migrate to uv groups internally. - Now that
[dependency-groups]are defined, you may want to use them consistently intox.ini(e.g. havelintalso pull fromdevinstead of spelling outpre-commit) and in any Docker/automation setup that still relies on.[test]/.[dev]installs, so there is a single source of truth for dev/test dependencies.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Removing the existing `[project.optional-dependencies]` extras (`[dev]`, `[doc]`, `[docs]`, `[style]`, `[test]`, `[tests]`) is a breaking change for consumers that install `bidsmreye[...]`; consider reintroducing these extras and mapping them to the new `[dependency-groups]` so external workflows keep working while you migrate to uv groups internally.
- Now that `[dependency-groups]` are defined, you may want to use them consistently in `tox.ini` (e.g. have `lint` also pull from `dev` instead of spelling out `pre-commit`) and in any Docker/automation setup that still relies on `.[test]`/`.[dev]` installs, so there is a single source of truth for dev/test dependencies.
## Individual Comments
### Comment 1
<location path="tox.ini" line_range="12-21" />
<code_context>
+[global_var]
+passenv =
+ CI
+ USERNAME
+ # Pass user color preferences through
+ PY_COLORS
</code_context>
<issue_to_address>
**suggestion:** Consider also passing `USER` for non-Windows environments that don’t set `USERNAME`.
On many Linux/macOS systems only `USER` is set, so tooling that depends on the username may not work as expected with only `USERNAME` in `passenv`. Including `USER` would improve cross-platform robustness.
```suggestion
[global_var]
passenv =
CI
USERNAME
USER
# Pass user color preferences through
PY_COLORS
FORCE_COLOR
NO_COLOR
CLICOLOR
CLICOLOR_FORCE
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #262 +/- ##
==========================================
+ Coverage 79.91% 81.73% +1.82%
==========================================
Files 13 16 +3
Lines 926 1046 +120
Branches 119 0 -119
==========================================
+ Hits 740 855 +115
- Misses 144 191 +47
+ Partials 42 0 -42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Remi-Gau
commented
Mar 23, 2026
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.
Uh oh!
There was an error while loading. Please reload this page.