Skip to content

Convert Makefile and CI to uv - #620

Closed
ordabayevy wants to merge 15 commits into
masterfrom
pr4-convert-makefile-ci-uv
Closed

Convert Makefile and CI to uv#620
ordabayevy wants to merge 15 commits into
masterfrom
pr4-convert-makefile-ci-uv

Conversation

@ordabayevy

Copy link
Copy Markdown
Member

Summary

  • Switch Makefile and GitHub Actions from pip to uv sync / uv run, without tracking a uv.lock.
  • Rename the former test dependency group to dev (uv's default); keep docs separate.
  • CI uses astral-sh/setup-uv (with matrix Python) and make install, then make test; torch/jax extras are added inexactly from the Makefile.
  • Carry temporary torch<=2.6 / jax<0.10 constraints under [tool.uv], bump actions/checkout to v7, and run format as part of make test.

Test plan

  • Default CI: make install then make test
  • Torch CI: FUNSOR_BACKEND=torch make test after make install
  • Jax CI: FUNSOR_BACKEND=jax make test after make install
  • Local: make install, make lint, make format
  • Optional: make docs (docs-only sync + uv run --no-sync)

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.
@ordabayevy
ordabayevy requested a review from fritzo August 1, 2026 18:33

@fritzo fritzo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread Makefile
uv run ruff format .

test: lint FORCE
test: FORCE

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@ordabayevy

Copy link
Copy Markdown
Member Author

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?

@ordabayevy ordabayevy closed this Aug 2, 2026
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.

2 participants