Skip to content

Move pre-commit from runtime dependencies to the dev group - #100

Merged
kathrynmurie merged 1 commit into
developfrom
drop-pre-commit-runtime-dep
Nov 4, 2026
Merged

kathrynmurie merged 1 commit into
developfrom
drop-pre-commit-runtime-dep

Conversation

@m-murphy

@m-murphy m-murphy commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

pre-commit was listed under [project].dependencies, so every install of pmotools pulled in pre-commit → virtualenv → packaging. Nothing in src/ imports it; it's only used for git hooks and CI. This moves it to the dev dependency group and regenerates uv.lock.

Why

PMO Builder runs pmotools in the browser via stlite/Pyodide. The latest virtualenv (21.x) requires packaging>=26.3, while stlite's Streamlit requires packaging<26. micropip resolves requirements concurrently, so app startup intermittently fails with:

ValueError: Requested 'packaging<26,>=20', but packaging==26.3 is already installed.

Impact

  • Wheel Requires-Dist is now pandas, biopython, jsonschema, openpyxl.
  • Contributors and CI are unaffected: uv sync / uv sync --dev install the dev group, so uv run pre-commit ... still works.
  • Users who relied on pip install pmotools to get pre-commit will need to install it separately.

Testing

  • uv run pytest: 264 passed
  • uv run pre-commit run --all-files: all hooks pass
  • Built the wheel and confirmed pre-commit is gone from its metadata

🤖 Generated with Claude Code

pre-commit is only used for local hooks and CI, but listing it as a runtime
dependency pulls pre-commit -> virtualenv -> packaging into every install.
In Pyodide/stlite, latest virtualenv requires packaging>=26.3, which conflicts
with Streamlit's packaging<26 and intermittently breaks PMO Builder startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kathrynmurie
kathrynmurie merged commit dcf6266 into develop Nov 4, 2026
3 checks passed
@kathrynmurie
kathrynmurie deleted the drop-pre-commit-runtime-dep branch November 4, 2026 18:32
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