Repository navigation
ci: switch from pre-commit to prek - #846
Conversation
prek is a drop-in, Rust-based reimplementation of pre-commit that reads the same .pre-commit-config.yaml. Swaps the pre-commit dependency and invocations (nox session / CI action) for prek. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The dependency/tooling swap is consistent across pyproject, lockfile, nox, and CI, and the CI action input name (extra-args) matches the action’s published interface.
Pull request overview
This PR switches the repository’s lint/format hook runner from pre-commit to prek (a compatible runner for the same .pre-commit-config.yaml) across local tooling (nox), dependency declarations, and CI.
Changes:
- Replace
pre-commitwithprekin dependency groups and regenerateuv.lockaccordingly. - Update the nox
lintsession to install and invokeprek. - Update CI to run hooks via
j178/prek-action.
File summaries
| File | Description |
|---|---|
uv.lock |
Regenerates the lockfile to remove pre-commit and add prek (plus dependency graph updates). |
pyproject.toml |
Swaps pre-commit to prek in dev and test dependency groups. |
noxfile.py |
Updates the lint session to session.install("prek") and run prek run .... |
.github/workflows/ci.yml |
Replaces pre-commit/action with j178/prek-action and passes extra-args. |
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #846 +/- ##
=======================================
Coverage 96.32% 96.32%
=======================================
Files 164 164
Lines 6769 6769
=======================================
Hits 6520 6520
Misses 249 249 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
.pre-commit-config.yaml— no hook changes neededpre-commitdependency forprekwherever it's declared (nox lint group / dev group) and updates the noxprecommitsession (or CI action) to invokeprekinsteaduv.lockto matchThis mirrors the same swap already merged in unxt#929, coordinax#881, jaxmore#26, quaxed#213, and quax-blocks#64.
Note: this repo's
.pre-commit-config.yamlstill has pre-commit.ci'sci:autoupdate block. Disabling the pre-commit.ci GitHub App integration itself is a setting on pre-commit.ci / the repo's installed-apps page, not something a code change can do — worth doing once this merges, to avoid running checks twice.Test plan
uv lockresolves cleanly withprekreplacingpre-commitprek run --all-files(andno-commit-to-branchspecifically) locally against this org's existing.pre-commit-config.yamlformat🤖 Generated with Claude Code