Skip to content

Commit 7eec379

Browse files
authored
docs: replace pre-commit by prek in the contrib instructions (#303)
1 parent 51894c9 commit 7eec379

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

Contributing.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ Run these commands in each of your sandboxes to enable our pre-commit hooks and
1717

1818
```sh
1919
pip install -e '.[dev]'
20-
pre-commit install
20+
prek install
2121
gitlint install-hook
2222
```
2323

2424
## Pre-commit hooks
2525

2626
The ReadAlong Studio team has agreed to systematically use a number of pre-commit hooks to
27-
normalize formatting of code. You need to install and enable pre-commit to have these used
28-
automatically when you do your own commits.
27+
normalize formatting of code. You need to install and enable `prek` (equivalent to
28+
`pre-commit`, but `prek` is faster) to have these used automatically when you do
29+
your own commits.
2930

3031
Pre-commit hooks enabled:
3132
- check-yaml validates YAML files
@@ -44,16 +45,16 @@ Pre-commit hooks enabled:
4445

4546
### Enabling pre-commit hooks
4647

47-
All the pre-commit hooks are executed using a tool called
48-
[pre-commit](https://pre-commit.com/). Once you enable pre-commit, it will run all the
48+
All the pre-commit hooks are executed using either [prek](https://prek.j178.dev/) (recommended), or
49+
[pre-commit](https://pre-commit.com/) (equivalent but slower). Once you enable either, it will run all the
4950
hooks each time you try to commit anything in this repo.
5051

5152
We've listed all the developper dependencies for the project in
5253
[pyproject.toml](pyproject.toml) to make them easy to install:
5354

5455
```sh
5556
pip install -e '.[dev]'
56-
pre-commit install
57+
prek install
5758
```
5859

5960
Note that you have to run the second command in every Studio sandbox you create, so please

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dev = [
6060
"gitlint-core>=0.17.0",
6161
"httpx>=0.24.1",
6262
"pep440>=0.1.2",
63-
"pre-commit>=2.6.0",
63+
"prek",
6464
"pytest",
6565
]
6666

0 commit comments

Comments
 (0)