deps: declare ruff + mypy in dev extra, pin via uv.lock#380
Merged
Conversation
9 tasks
Adds a 'dev' optional-dependency group containing ruff and mypy so the tools invoked by AGENTS.md and CI are pinned and reproducible instead of installed ad-hoc each run. - pyproject.toml: new [project.optional-dependencies].dev with ruff>=0.15.0 and mypy>=1.18.0 - uv.lock: regenerated; ruff 0.15.14 and mypy 2.1.0 resolved - .github/workflows/python-lint.yml: drop ad-hoc 'pip install ruff', default install-spec to '.[dev]' - .github/workflows/python-typecheck.yml: drop ad-hoc 'pip install mypy', default install-spec to '.[dev,test]' (mypy needs types-PyYAML) - .github/workflows/ci.yml: pass dedicated install-specs for lint (.[dev]) and typecheck (.[dev,test]); other jobs unchanged - prompts/test-coverage-gap-review.md: use 'uv sync --extra test' + 'uv run python -m pytest' instead of bare 'python -m pytest'
3b1e844 to
02cf941
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
devoptional-dependency group containingruffandmypyso the tools invoked byAGENTS.mdand CI are pinned and reproducible, instead of being installed ad-hoc on every CI run and every contributor machine.Follow-up to the audit of
prompts/tooling requirements (#379 coveredpip-audit).Problem
AGENTS.mdinstructs contributors to runruff check .andmypy, and CI runs the same. But neither tool was declared anywhere inpyproject.tomloruv.lock:python -m pip install ruff/mypyad-hoc, pulling whatever version PyPI served at the moment.uvxseparately.Changes
pyproject.tomlNew
devoptional-dependency group:uv.lockRegenerated. Adds
ruff 0.15.14,mypy 2.1.0,mypy-extensions 1.1.0.Workflows
.github/workflows/python-lint.yml— removedpython -m pip install ruff; defaultinstall-specchanged from.[test]to.[dev]..github/workflows/python-typecheck.yml— removedpython -m pip install mypy; defaultinstall-specchanged from.[test]to.[dev,test](mypy needstypes-PyYAMLfromtest)..github/workflows/ci.yml— passes dedicated install-specs:py-lint→.[dev](override viavars.CI_PYTHON_LINT_INSTALL_SPEC)py-typecheck→.[dev,test](override viavars.CI_PYTHON_TYPECHECK_INSTALL_SPEC)py-buildandpy-testunchanged (still.[test]viaCI_PYTHON_INSTALL_SPEC)The reusable lint/typecheck workflows remain generic — they still take
install-specas an input, just no longer hardcode a tool install.prompts/test-coverage-gap-review.mdSwitched the prerequisite command from bare
python -m pytesttouv sync --extra test+uv run python -m pytest, matching the style now used independency-health-review.md.Verification
Notes
uv sync\u2014 they're designed to be repo-agnostic and pip-based. The minimal change here fully solves the unpinned-tooling problem without breaking that design.varskeys are introduced (CI_PYTHON_LINT_INSTALL_SPEC,CI_PYTHON_TYPECHECK_INSTALL_SPEC); both have safe defaults, no manual setup needed.