MAINT: add 'dev' dependency group, add uv-sync CI check - #894
Conversation
rgommers
left a comment
There was a problem hiding this comment.
Thanks @mwtoews. First impression: this looks good. Two thoughts:
- We can actually drop Python 3.9 I think, the EOL date for it was October 31, 2025. And we dropped Python 3.8 about a year ago, in gh-799. @dnicolodi do you agree?
- We may want to exercise this in CI to ensure it stays fixed. We don't have to commit the lock file, but just a job that runs
uv syncwould catch this.
Both could be done as follow-ups, this seems mergeable as is.
Meson 1.12 requires Python 3.10. I think we can just drop support for Python 3.9. This would allow to reduce a tiny bit the number of CI jobs we need to run, and to use a more modern version of mypy. The only obstacle I see is our Cygwin CI job using Python 3.9. Until not very long ago, that was the latest Python version available on Cygwin. |
I just checked: in the time between Cygwin added Python 3.12 packages. |
This is a good idea, and would be worthwhile including in this PR while I'm at it. It would effectively do this: $ uv sync --group test --dry-run
Using CPython 3.14.2
Would create project environment at: .venv
Resolved 49 packages in 47ms
Would create lockfile at: uv.lock
Would download 1 package
Would install 15 packages
+ build==1.6.1
+ coverage==7.16.0
+ cython==3.3.0
+ iniconfig==2.3.0
+ meson==1.12.0
+ meson-python @ file:///tmp/meson-python
+ packaging==26.3
+ pluggy==1.6.0
+ pygments==2.21.0
+ pyproject-hooks==1.2.0
+ pyproject-metadata==0.12.1
+ pytest==9.1.1
+ pytest-cov==7.1.0
+ pytest-mock==3.15.1
+ wheel==0.48.0 |
02258ea to
1d02a05
Compare
rgommers
left a comment
There was a problem hiding this comment.
Two requests:
- Can you add the
uv synctest at the bottom oftests.ymlplease? No need for a separate file here, nor a cron job. - Can you rewrite the commit history so it's one commit per logical change? We prefer using rebase-merging and aim to keep a clean linear history.
cd317e7 to
aeaa1d5
Compare
dnicolodi
left a comment
There was a problem hiding this comment.
Some more comments from my side.
I am also wondering: should we switch to uv for all jobs? That would exercise the dependencies installation without having to add a dedicated job. We can do this at a later time.
I'd do that later, if we do it. We can't just add |
aeaa1d5 to
9ebb2b1
Compare
|
Note that the As for |
9ebb2b1 to
c80c363
Compare
|
Thanks @mwtoews. Merging. |
This PR helps development with uv. There is an issue with uv sync in this project:
The incompatibility with
sphinx ~= 8.1.0is resolved by requiring this dependency to require Python >= 3.10. (An alternative fix is to drop Python 3.9 from this project, but I'm not here to suggest that right now). This means that an older version of sphinx is selected for Python 3.9 users that want to build docs (probably not anyone).This PR also adds a "dev" dependency group, with pre-commit and including everything in the "test" group (but not "docs"). Uv automatically includes "dev", which is handy when running
uv sync. Or with a venv,pip install --group devwill install all the development dependencies.Lastly, ignore all
*.lockfiles (e.g.uv.lock,pixi.lock, and others).