Commit b0ca6c6
authored
new logic for tests - bad and good example; hook checking nb outputs; (#61)
* create hook checking if notebook executed and without errors
* add executable;move to correct dir
* add main
* add imports an dependencies; remove doubled code; specify exceptions
* update tests; error msg
* define func possible to move to utils; add todo flag
* add docstrings
* run check-badges only on good examples
* new structure for pre-commit hooks
* fix notebooks
* change logic of checked files
* refactor hooks using copilot
* rename notebooks
* add new tests for hooks
* add test to run notebooks; exclude bad example
* update notebooks
* pylint hints; remove some unnecessary comments,; cleanup
* change exceptions
* change exception to ValueError
* remove duplicated code
* add nu_ju to executables
* add check=True flag
* exclude bad example from run on CI workflow
* run pre-commit hook black-26.1.0
* do not fail the whole test, when error is expected
* rerun example-notebooks
* clear output for bad example
* add test for notebooks-output
* use should_fail in assertion
* move relpath function to hook that uses it; fix misuse of absolute and relative paths
* reuse ValueError for re-raising (pylint hint)
* remove fix header option
* remove header fixing at all as it is not well-designed and not essential
* pass tmp path to badges check for notebooks created during tests1 parent e99aa4d commit b0ca6c6
15 files changed
Lines changed: 799 additions & 254 deletions
File tree
- .github/workflows
- hooks
- tests
- examples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments