Skip to content

docs: replace pre-commit by prek in the contrib instructions#303

Open
joanise wants to merge 1 commit intomainfrom
dev.ej/prek
Open

docs: replace pre-commit by prek in the contrib instructions#303
joanise wants to merge 1 commit intomainfrom
dev.ej/prek

Conversation

@joanise
Copy link
Copy Markdown
Member

@joanise joanise commented May 7, 2026

PR Goal?

Replace pre-commit by prek https://prek.j178.dev/

  • prek uses uv to install hooks much faster
  • built in Rust, with the explicit intent to be fast
  • it can run the hooks in parallel when multiple files are affected
  • it's a drop-in replacement requiring no other change than doing prek install instead of pre-commit install

Fixes?

my growing annoyance with pre-commit, and really, just cause all these new rust-based tools actually are nicer. :)

I've actually been using prek for months now, but I didn't to impose it on anyone. When I mentioned it to Samuel, he chided me for now sharing the joy, so this PR is me finally doing that sharing.

It's not a huge difference, but it's still enough difference I found it worth switching, especially given how trivial it is to switch.

How to test?

Install prek:

  • redo pip install -e ".[dev]", or just do pip install prek, or even uv tool install prek` for a global install

Remove the pre-commit hook if you installed it before

rm .git/hooks/pre-commit

(Re-)install the hook:

prek install

Now commit some changes. prek will have to install everything in .pre-commit-config.yaml fresh, so the first time will be slow, though not nearly as slow as when using pre-commit, and subsequent times will be nice and fast.

Confidence?

high

Version change?

no

Related PRs?

EveryVoiceTTS/EveryVoice#798
NRC-ILT/g2p#490

@semanticdiff-com
Copy link
Copy Markdown

Review changes with  SemanticDiff

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

CLI load time: 0:00.05
Pull Request HEAD: 9433350af56a3985162ed3e353c6de1a3c895f7f
No imports take more than 0.1 s.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.76%. Comparing base (ed7b565) to head (9433350).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #303   +/-   ##
=======================================
  Coverage   93.76%   93.76%           
=======================================
  Files          21       21           
  Lines        1765     1765           
  Branches      295      295           
=======================================
  Hits         1655     1655           
  Misses         73       73           
  Partials       37       37           

☔ View full report in Codecov by Sentry.
📢 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.

1 participant