Skip to content

Conversation

ulgens
Copy link
Member

@ulgens ulgens commented Oct 11, 2025

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

🚀 A single binary with no dependencies, does not require Python or any other runtime.
⚡ About 10x faster than pre-commit and uses only half the disk space.
🔄 Fully compatible with the original pre-commit configurations and hooks.
🏗️ Built-in support for monorepos (i.e. workspace mode).
🐍 Integration with uv for managing Python virtual environments and dependencies.
🛠️ Improved toolchain installations for Python, Node.js, Go, Rust and Ruby, shared between hooks.
📦 Built-in Rust-native implementation of some common hooks.

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.

@ulgens ulgens force-pushed the prek branch 3 times, most recently from 96208a8 to 801dc83 Compare October 11, 2025 21:07
@ulgens ulgens requested review from a team and Copilot October 11, 2025 21:17
Copy link

@Copilot Copilot AI left a 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.

@ulgens ulgens marked this pull request as ready for review October 11, 2025 21:18
@ulgens
Copy link
Member Author

ulgens commented Oct 11, 2025

Apart from this PRs merge status, we can disable pre-commit.ci integration, we have the related workflow already in the repo.

@ulgens ulgens added the dependencies Pull requests that update a dependency file label Oct 11, 2025
@ulgens ulgens self-assigned this Oct 11, 2025
Copy link
Member

@pauloxnet pauloxnet left a 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.

@ulgens ulgens requested a review from a team October 12, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants