Convert Makefile and CI to uv - #620
Conversation
Use uv sync/run for the existing test/torch/jax matrix without a tracked lockfile, keep temporary torch/jax constraints, and prefer CPU PyTorch wheels.
Keep the uv cutover as a tool swap; do not reintroduce special torch wheel index wiring that PR 2 dropped.
Drop actions/setup-python and pass the matrix version into astral-sh/setup-uv.
Each target installs only what it needs without removing existing packages, so local envs accumulate backends over time while CI jobs stay lean. Drop the separate CI uv sync steps now that make test owns installation.
Leave test/docs/dev groups to the targets that need them; use an exact project-only sync for install.
Drop the old composite dev group, rely on uv's default dev group in most Makefile syncs, and keep --no-default-groups only for docs.
Drop inexact sync from lint/format/license; CI installs the default dev group via make install, while torch/jax extras still sync from make test.
Those targets no longer pre-sync, so let uv run manage the default env.
Plain uv run is enough elsewhere now that dev is the default group.
Keep lint/format as local auto-fix helpers; CI-style make test should fail on lint/format issues rather than rewriting the tree.
fritzo
left a comment
There was a problem hiding this comment.
What's the motivation for switching to uv in CI? While I use uv locally, I have so far avoided dependency on uv in CI, aiming for a minimal supply chain. Requiring uv in the Makefile imposes an opinion on contributors. What does it gain us as maintainers?
| uv run ruff format . | ||
|
|
||
| test: lint FORCE | ||
| test: FORCE |
There was a problem hiding this comment.
This seems quite intrusive. These tests are useful insofar as they often fail, whereupon users will pytest ... an individual test. It seems like extra friction to uv run pytest .... Can instead activate an environment or something so that python and ruff and pytest all refer to a uv environment?
|
Agree with your concerns, I was also hesitant about opening this PR. Opened one last PR to modernize ReadTheDocs #621 and then we can cut a release? |
Summary
uv sync/uv run, without tracking auv.lock.testdependency group todev(uv's default); keepdocsseparate.astral-sh/setup-uv(with matrix Python) andmake install, thenmake test; torch/jax extras are added inexactly from the Makefile.torch<=2.6/jax<0.10constraints under[tool.uv], bumpactions/checkoutto v7, and runformatas part ofmake test.Test plan
make installthenmake testFUNSOR_BACKEND=torch make testaftermake installFUNSOR_BACKEND=jax make testaftermake installmake install,make lint,make formatmake docs(docs-only sync +uv run --no-sync)