Skip to content

Commit

Permalink
Add nbstripout pre-commit hook (#428)
Browse files Browse the repository at this point in the history
* Add nbstripout pre-commit hook

* Add -q and re-run all notebooks

* Update CHANGELOG.md

* Update notebooks

* Set numpy random seed in notebooks

* Re-run with fixed seed

* Add drop-empty-cells to nbstripout hook

Co-authored-by: Brady Planden <[email protected]>

* Add comment on random seed

---------

Co-authored-by: Brady Planden <[email protected]>
  • Loading branch information
NicolaCourtier and BradyPlanden authored Jul 31, 2024
1 parent 71175cc commit 08fa1cb
Show file tree
Hide file tree
Showing 12 changed files with 2,422 additions and 5,896 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ repos:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
args: ['--keep-output', '--drop-empty-cells']
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- [#427](https://github.com/pybop-team/PyBOP/issues/427) - Adds the nbstripout pre-commit hook to remove unnecessary metadata from notebooks.
- [#327](https://github.com/pybop-team/PyBOP/issues/327) - Adds the `WeightedCost` subclass, defines when to evaluate a problem and adds the `spm_weighted_cost` example script.
- [#393](https://github.com/pybop-team/PyBOP/pull/383) - Adds Minkowski and SumofPower cost classes, with an example and corresponding tests.
- [#403](https://github.com/pybop-team/PyBOP/pull/403/) - Adds lychee link checking action.
Expand Down
444 changes: 131 additions & 313 deletions examples/notebooks/LG_M50_ECM/1-single-pulse-circuit-model.ipynb

Large diffs are not rendered by default.

112 changes: 49 additions & 63 deletions examples/notebooks/comparing_cost_functions.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 08fa1cb

Please sign in to comment.