Skip to content

Commit 6b977fb

Browse files
authored
Merge pull request #111 from hendo-21/docs/contributing
docs(contributing): improve dev environment setup instructions
2 parents 3052b45 + 1985e35 commit 6b977fb

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ When you make changes, aim to:
3737
- Add or update tests and documentation if your change affects behavior or public APIs.
3838
- Keep commits logically grouped (for example, separate “refactor” from “new feature” where it makes sense).
3939

40-
**Please note** that, in order to test your changes, you need to reinstall `fenn` locally in editable mode by running:
40+
**Please note** that, in order to test your changes, you need to reinstall `fenn` locally in editable mode along with its dev and test dependencies. `fenn` uses pre-commit and ruff for automated linting and formatting. From the base project directory (the one containing the project `pyproject.toml` file), run:
4141

4242
```
43-
pip install -e .
43+
pip install -e ".[dev,test]"
4444
```
4545

46-
from the base project directory (the one containing the project `pyproject.toml` file).
46+
### Set up pre-commit hooks
47+
48+
Run `pre-commit install` to wire up the pre-commit git hook. This only needs to be done once after cloning your fork.
49+
50+
This makes pre-commit run the configured hooks (`ruff check` and `ruff format` currently) on every `git commit`. Your commit may be blocked if a hook reports a failure or modifies a file. `ruff format` may reformat your code automatically, so you'll need to review the modifications and stage them again before committing. Without this step your commits may fail CI.
51+
52+
See the [`ruff` documentation](https://docs.astral.sh/ruff/) for more information.
4753

4854
Once your branch is ready:
4955

0 commit comments

Comments
 (0)