Skip to content
Open
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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ repos:
pass_filenames: false # only run this check once globally per repo
always_run: true

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
args: [--keep-output]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.10
hooks:
Expand Down
14 changes: 14 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ improved
[complex numbers](https://optax.readthedocs.io/en/latest/api/contrib.html?complex-valued-optimization#complex-valued-optimization) support in Optax.


## Pre-commit hooks

The repository uses [pre-commit](https://pre-commit.com/) hooks, including
nbstripout to normalize notebook metadata. nbstripout runs with
`--keep-output`, so cell outputs and figures are preserved (they render in
the docs); only execution counts and cell ids are normalized. To run the
hooks locally:

```bash
pip install pre-commit
pre-commit run --all-files
```


## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Expand Down
Loading
Loading