File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 35
35
- name : pre-commit
36
36
run : pixi run pre-commit-run --color=always --show-diff-on-failure
37
37
38
- mypy -example-nbs :
39
- name : Check notebooks mypy
38
+ check -example-nbs :
39
+ name : Check notebooks mypy and output exists
40
40
timeout-minutes : 5
41
41
runs-on : ubuntu-latest
42
42
steps :
48
48
run : |
49
49
pixi run nb-convert
50
50
pixi run nb-mypy
51
+ pixi run nb-assert-output
51
52
52
53
unit-tests :
53
54
name : Unit Tests
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
1
3
for notebook in docs/examples/* .ipynb; do
2
4
# Check the notebook for null execution counts
3
5
if ! jq -e ' .cells | map(select(.cell_type == "code") | .execution_count != null) | all' " $notebook " > /dev/null; then
@@ -6,6 +8,5 @@ for notebook in docs/examples/*.ipynb; do
6
8
fi
7
9
done
8
10
9
- # If all notebooks are valid
10
11
echo " All notebooks have valid execution counts."
11
12
exit 0
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ coverage = "pytest tests --cov=metalearners --cov-report=xml --cov-report term-m
9
9
# Note that this task will fail on systems without bash.
10
10
nb-convert = " nb-convert.sh"
11
11
nb-mypy = " mypy docs/examples/*.py"
12
+ nb-assert-output = " nb-output-check.sh"
12
13
13
14
[dependencies ]
14
15
pre-commit = " *"
You can’t perform that action at this time.
0 commit comments