Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,16 +45,16 @@ 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
[pyproject.toml](pyproject.toml) to make them easy to install:

```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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down
Loading