-
-
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.
| Pre-commit checks | ||
| prek checks | ||
| ----------------- | ||
| `pre-commit <https://pre-commit.com>`_ is a framework to run hooks written in many languages, and it manages the language toolchain and dependencies for running the hooks. |
Copilot
AI
Oct 11, 2025
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.
This line describes pre-commit but appears in a section about prek. The description should be updated to describe prek instead.
| `pre-commit <https://pre-commit.com>`_ is a framework to run hooks written in many languages, and it manages the language toolchain and dependencies for running the hooks. | |
| `prek <https://prek.j178.dev/>`_ is a tool for running git hooks, similar to pre-commit, but designed to be faster and dependency-free. |
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.
This is intentional.
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 understand you intentionally left pre-commit sentence here. What's your goal in doing that?
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.
@pauloxnet That text is from prek's readme. I didn't leave it there, I copied it from https://github.com/j178/prek/blob/ee7110b49bb1aa8d7b3ccee51c5241550cb0aec2/README.md . If this is somehow confusing, I'm open for recommendations.
0b9e031 to
11d339a
Compare
|
Apart from this PRs merge status, we can disable |
pauloxnet
left a comment
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 checks | ||
| prek checks | ||
| ----------------- | ||
| `pre-commit <https://pre-commit.com>`_ is a framework to run hooks written in many languages, and it manages the language toolchain and dependencies for running the hooks. |
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 understand you intentionally left pre-commit sentence here. What's your goal in doing that?
|
Rebased and resolved the conflicts. Do we have any concerns about this change? What is needed for the next step? |
I approved. I hope other can test it and approve it too. |
e23275e to
69fb6df
Compare
# Conflicts: # README.rst # Conflicts: # requirements/dev.txt # Conflicts: # requirements/dev.txt
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.