Skip to content

ci: switch from pre-commit to prek - #846

Merged
nstarman merged 1 commit into
mainfrom
switch-to-prek
Sep 15, 2026
Merged

nstarman merged 1 commit into
mainfrom
switch-to-prek

Conversation

@nstarman

Copy link
Copy Markdown
Contributor

Summary

  • Switches from pre-commit to prek, a drop-in, Rust-based reimplementation that reads the same .pre-commit-config.yaml — no hook changes needed
  • Swaps the pre-commit dependency for prek wherever it's declared (nox lint group / dev group) and updates the nox precommit session (or CI action) to invoke prek instead
  • Regenerates uv.lock to match

This 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.yaml still has pre-commit.ci's ci: 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 lock resolves cleanly with prek replacing pre-commit
  • Verified prek run --all-files (and no-commit-to-branch specifically) locally against this org's existing .pre-commit-config.yaml format

🤖 Generated with Claude Code

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>
Copilot AI lite review requested due to automatic review settings September 15, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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-commit with prek in dependency groups and regenerate uv.lock accordingly.
  • Update the nox lint session to install and invoke prek.
  • 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.

@nstarman nstarman added this to the v0.1.0 milestone Sep 15, 2026
@nstarman
nstarman merged commit 3246221 into main Sep 15, 2026
16 checks passed
@nstarman
nstarman deleted the switch-to-prek branch September 15, 2026 14:55
@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.32%. Comparing base (4d42faf) to head (6175188).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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