Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

Commit 004ed18

Browse files
committed
nbstripout add
1 parent 2ba33a3 commit 004ed18

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
repos:
2+
# Linting
23
- repo: https://github.com/pycqa/flake8
34
rev: 3.9.2 # can also add a git hash or tag
45
hooks:
56
- id: flake8
67

8+
# Documnetation
79
- repo: https://github.com/pycqa/pydocstyle
810
rev: 6.1.1 # pick a git hash / tag to point to
911
hooks:
1012
- id: pydocstyle
11-
files: ^examplepackage/
13+
files: ^examplepackage/
14+
15+
# OPTIONAL: strips out the data and output cells from notebooks
16+
- repo: https://github.com/kynan/nbstripout
17+
rev: 0.5.0
18+
hooks:
19+
- id: nbstripout

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ To run a pydocstyle check you simply execute the terminal command:
9393

9494
You can configure pydocstyle by adding a section for it in the [setup.cfg](setup.cfg) file. For this template we're using the numpy documentation convention and we're choosing to ignore some specific standards (e.g. D400 - docstring should be in imperative mood)
9595

96+
## nbstripout
97+
[nbstripout](https://github.com/kynan/nbstripout) strips out output from Jupyter notebooks
98+
Here we're using it as a pre-commit hook and it's configured in the .pre-commit-config.yaml
99+
100+
Here is a video showing the main functionalities -> https://www.youtube.com/watch?v=BEMP4xacrVc
101+
96102
## pytest
97103
Quotting the the [pytest documentation](https://docs.pytest.org/en/6.2.x/index.html) directly:
98104
*"The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries."*

0 commit comments

Comments
 (0)