From 9433350af56a3985162ed3e353c6de1a3c895f7f Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Thu, 7 May 2026 16:54:31 -0400 Subject: [PATCH] docs: replace pre-commit by prek in the contrib instructions --- Contributing.md | 13 +++++++------ pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Contributing.md b/Contributing.md index a0ab473a..dc060c29 100644 --- a/Contributing.md +++ b/Contributing.md @@ -17,15 +17,16 @@ Run these commands in each of your sandboxes to enable our pre-commit hooks and ```sh pip install -e '.[dev]' -pre-commit install +prek install gitlint install-hook ``` ## Pre-commit hooks The ReadAlong Studio team has agreed to systematically use a number of pre-commit hooks to -normalize formatting of code. You need to install and enable pre-commit to have these used -automatically when you do your own commits. +normalize formatting of code. You need to install and enable `prek` (equivalent to +`pre-commit`, but `prek` is faster) to have these used automatically when you do +your own commits. Pre-commit hooks enabled: - check-yaml validates YAML files @@ -44,8 +45,8 @@ Pre-commit hooks enabled: ### Enabling pre-commit hooks -All the pre-commit hooks are executed using a tool called -[pre-commit](https://pre-commit.com/). Once you enable pre-commit, it will run all the +All the pre-commit hooks are executed using either [prek](https://prek.j178.dev/) (recommended), or +[pre-commit](https://pre-commit.com/) (equivalent but slower). Once you enable either, it will run all the hooks each time you try to commit anything in this repo. We've listed all the developper dependencies for the project in @@ -53,7 +54,7 @@ We've listed all the developper dependencies for the project in ```sh pip install -e '.[dev]' -pre-commit install +prek install ``` Note that you have to run the second command in every Studio sandbox you create, so please diff --git a/pyproject.toml b/pyproject.toml index 115f3fdd..894f70fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ dev = [ "gitlint-core>=0.17.0", "httpx>=0.24.1", "pep440>=0.1.2", - "pre-commit>=2.6.0", + "prek", "pytest", ]