-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Migrate to prek #2252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Migrate to prek #2252
Conversation
96208a8
to
801dc83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates from pre-commit to prek, a Rust-based alternative that promises better performance and compatibility. The migration replaces the Python-based pre-commit tool with prek while maintaining the same functionality for code quality checks.
Key changes:
- Updates dependency from pre-commit to prek in development requirements
- Replaces GitHub Actions workflow to use prek-action instead of pre-commit
- Updates documentation to reflect the new tool and installation instructions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
requirements/dev.txt | Replaces pre-commit dependency with prek |
README.rst | Updates documentation section from "Pre-commit checks" to "prek checks" with new installation instructions |
.github/workflows/prek.yml | Adds new GitHub Actions workflow for prek |
.github/workflows/pre-commit.yml | Removes old pre-commit workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Apart from this PRs merge status, we can disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple of minor comments.
Thanks for the PR. I approved it.
pre-commit development was stagnant for a while and now there is a strong alternative that's been writen with Rust: https://github.com/j178/prek
prek's readme list its features as
I tested it with the projects I'm working on and things are working fine, and even better because prek is faster while installing and running the hook dependencies.
We had a small discussion about the issues with pre-commit's maintenance and agreed to give a chance to prek, on Slack.
I tried to implement the simplest config for CI. We can also implement an optimized workflow with UV, similar to this one and shave off a couple more seconds from the runtime but I'm not sure that is necessary.