Skip to content

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

Open
CameronBrooks11 wants to merge 1 commit into
mainfrom
chore/migrate-to-uv-lock
Open

chore: migrate Python deps from requirements-lock.txt to uv lock#10
CameronBrooks11 wants to merge 1 commit 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.
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