Skip to content

chore: migrate Python deps from requirements-lock.txt to uv lock#10

Merged
CameronBrooks11 merged 3 commits into
mainfrom
chore/migrate-to-uv-lock
May 25, 2026
Merged

chore: migrate Python deps from requirements-lock.txt to uv lock#10
CameronBrooks11 merged 3 commits into
mainfrom
chore/migrate-to-uv-lock

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Summary

Replaces the manual pip freeze > requirements-lock.txt workflow with uv's native lock file (uv.lock).

Changes

  • pyproject.toml: Added [project] section with [project.optional-dependencies] dev declaring all Python deps (previously in requirements.txt)
  • uv.lock: Generated via uv lock — resolver-guaranteed consistent resolution
  • CI workflows: Migrated from pip install -r requirements-lock.txt to astral-sh/setup-uv + uv sync --locked --extra dev
  • Removed: requirements.txt, requirements-lock.txt, lockfile validation steps
  • renovate.json: Switched to pep621 manager, enabled lockFileMaintenance (weekly), added minimumReleaseAge

Why

The old pattern had no automated way to keep the lock file in sync with resolver guarantees. With uv lock:

  • Lock is always resolver-consistent (full dependency graph)
  • Renovate's pep621 manager natively understands uv.lock
  • lockFileMaintenance regenerates the full lock weekly
  • Matches the pattern already used in anolis-workbench

Local dev

uv sync --extra dev    # install all deps
uv run pytest tests/   # run tests
uv run mypy tests      # type check

Replace the manual pip freeze workflow with uv's native lock file:
- Add [project] + [project.optional-dependencies] dev to pyproject.toml
- Generate uv.lock (resolver-guaranteed consistency)
- Update all CI workflows to use astral-sh/setup-uv + uv sync --locked
- Remove requirements.txt and requirements-lock.txt
- Update renovate.json: pep621 manager, lockFileMaintenance, ignore legacy files

Renovate now manages deps via the pep621 manager and will
run lockFileMaintenance weekly to keep uv.lock current.
Same fix as anolis — CMake resolves .venv/bin/python symlink to
the system Python, which has no pytest. Explicitly passing the venv
path prevents symlink resolution.
@CameronBrooks11
CameronBrooks11 force-pushed the chore/migrate-to-uv-lock branch from a38d05d to 71bba96 Compare May 25, 2026 04:11
@CameronBrooks11
CameronBrooks11 merged commit 45e81f0 into main May 25, 2026
12 checks passed
@CameronBrooks11
CameronBrooks11 deleted the chore/migrate-to-uv-lock branch May 25, 2026 19:54
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.

1 participant