chore(CI/dev): use prek to replace pre-commit#5186
chore(CI/dev): use prek to replace pre-commit#5186wanghan-iapcm merged 2 commits intodeepmodeling:masterfrom
Conversation
`prek` is `pre-commit` written in Rust, just like `uv pip` and `pip`.
|
Related Documentation No published documentation to review for changes on this repository. |
There was a problem hiding this comment.
Pull request overview
This PR replaces the Python-based pre-commit tool with prek, a Rust-based alternative that offers better performance while maintaining full compatibility with the existing .pre-commit-config.yaml configuration format.
Changes:
- Replaced
pre-commitdependency withprekin pyproject.toml - Updated installation and usage instructions in documentation to reference
prek - Updated devcontainer configurations and scripts to use
prekcommands - Updated GitHub workflow to install and use
prekinstead ofpre-commit - Bumped torchfix version from 0.6.0 to 0.7.0
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Replaced pre-commit with prek in dev dependency group |
| doc/development/coding-conventions.rst | Updated documentation to reference prek with GitHub link and uv tool install command |
| .pre-commit-config.yaml | Updated torchfix version from 0.6.0 to 0.7.0 (unrelated to main PR purpose) |
| .github/workflows/copilot-setup-steps.yml | Updated workflow steps to install and use prek instead of pre-commit |
| .devcontainer/devcontainer.json | Changed postCreateCommand to use prek install-hooks |
| .devcontainer/build_py.sh | Updated script to run prek install instead of pre-commit install |
| .devcontainer/README.md | Updated documentation to reference prek instead of pre-commit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📝 WalkthroughWalkthroughThis PR replaces references to "pre-commit" with "prek" across devcontainer files, CI workflow, docs, and pyproject, and upgrades the flake8 hook's torchfix additional_dependency from 0.6.0 to 0.7.0. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jinzhe Zeng <njzjz@qq.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5186 +/- ##
=======================================
Coverage 81.95% 81.95%
=======================================
Files 714 714
Lines 73441 73441
Branches 3616 3616
=======================================
+ Hits 60187 60188 +1
Misses 12091 12091
+ Partials 1163 1162 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
prekispre-commitwritten in Rust, just likeuv pipandpip.Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.