Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a081c61
create hook checking if notebook executed and without errors
AgnieszkaZaba Dec 20, 2025
43926da
add executable;move to correct dir
AgnieszkaZaba Dec 20, 2025
7a11f25
add main
AgnieszkaZaba Dec 20, 2025
c3124b0
add imports an dependencies; remove doubled code; specify exceptions
AgnieszkaZaba Dec 21, 2025
11c0911
update tests; error msg
AgnieszkaZaba Dec 21, 2025
cd9fc79
define func possible to move to utils; add todo flag
AgnieszkaZaba Dec 21, 2025
38c2da1
add docstrings
AgnieszkaZaba Dec 21, 2025
ce985c6
run check-badges only on good examples
AgnieszkaZaba Jan 10, 2026
77b8c26
new structure for pre-commit hooks
AgnieszkaZaba Jan 10, 2026
3f0c227
fix notebooks
AgnieszkaZaba Jan 10, 2026
a474342
change logic of checked files
AgnieszkaZaba Jan 10, 2026
0cdcbb5
refactor hooks using copilot
AgnieszkaZaba Jan 15, 2026
76baa26
rename notebooks
AgnieszkaZaba Jan 15, 2026
8b86acc
add new tests for hooks
AgnieszkaZaba Jan 15, 2026
bdc5990
add test to run notebooks; exclude bad example
AgnieszkaZaba Jan 15, 2026
d736032
update notebooks
AgnieszkaZaba Jan 15, 2026
24bde5f
pylint hints; remove some unnecessary comments,; cleanup
AgnieszkaZaba Jan 15, 2026
ec738dd
change exceptions
AgnieszkaZaba Jan 15, 2026
7c9b6dc
change exception to ValueError
AgnieszkaZaba Jan 15, 2026
74f0048
remove duplicated code
AgnieszkaZaba Jan 15, 2026
b31b7f8
add nu_ju to executables
AgnieszkaZaba Jan 15, 2026
0de9e63
add check=True flag
AgnieszkaZaba Jan 15, 2026
f0b536d
exclude bad example from run on CI workflow
AgnieszkaZaba Feb 6, 2026
6a7dba5
run pre-commit hook black-26.1.0
AgnieszkaZaba Feb 6, 2026
0fca0ca
do not fail the whole test, when error is expected
AgnieszkaZaba Feb 6, 2026
557448d
rerun example-notebooks
AgnieszkaZaba Feb 6, 2026
24d3a47
clear output for bad example
AgnieszkaZaba Feb 6, 2026
3e1f7a6
add test for notebooks-output
AgnieszkaZaba Feb 6, 2026
5b9f8da
use should_fail in assertion
AgnieszkaZaba Feb 6, 2026
c190f55
move relpath function to hook that uses it; fix misuse of absolute an…
AgnieszkaZaba Feb 6, 2026
8b70b20
reuse ValueError for re-raising (pylint hint)
AgnieszkaZaba Feb 6, 2026
9c89f06
remove fix header option
AgnieszkaZaba Feb 6, 2026
0c0e42e
remove header fixing at all as it is not well-designed and not essential
AgnieszkaZaba Feb 6, 2026
4deae72
pass tmp path to badges check for notebooks created during tests
AgnieszkaZaba Feb 7, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
pip install pre-commit
pre-commit clean
pre-commit autoupdate
pre-commit run --all-files
pre-commit run --files $(git ls-files | grep -v tests/examples/bad.ipynb)

selftest:
needs: [pylint, precommit]
Expand Down
31 changes: 25 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_stages: [pre-commit]

repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.11.0
rev: 26.1.0
hooks:
- id: black

Expand All @@ -13,10 +13,10 @@ repos:
- id: end-of-file-fixer
- id: debug-statements

- repo: https://github.com/christopher-hacker/enforce-notebook-run-order
rev: 2.1.1
hooks:
- id: enforce-notebook-run-order
# - repo: https://github.com/christopher-hacker/enforce-notebook-run-order
# rev: 2.1.1
# hooks:
# - id: enforce-notebook-run-order

- repo: local
hooks:
Expand All @@ -27,6 +27,7 @@ repos:
- nbformat
language: python
types: [jupyter]
exclude: tests/examples/bad.ipynb

- id: check-badges
name: check badges
Expand All @@ -35,6 +36,24 @@ repos:
- nbformat
- pytest
- gitpython
args: [--fix-header, --repo-name=devops_tests]
args: [--repo-name=devops_tests]
language: python
types: [jupyter]
exclude: tests/examples/bad.ipynb

- id: notebooks-output
name: notebooks output
entry: notebooks_output
additional_dependencies:
- nbformat
language: python
types: [jupyter]
exclude: tests/examples/bad.ipynb

- id: notebooks-using-jupyter-utils
name: notebooks using open-atmos-jupyter-utils
entry: notebooks_using_jupyter_utils
additional_dependencies:
- nbformat
language: python
types: [ jupyter ]
16 changes: 16 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@
language: python
stages: [pre-commit]
types: [jupyter]

- id: notebooks-output
name: notebooks output
description: check if notebooks are executed and without errors and warnings
entry: notebooks_output
language: python
stages: [pre-commit]
types: [jupyter]

- id: notebooks-using-jupyter-utils
name: notebooks using open-atmos-jupyter-utils
description: check if notebook use show_anim() and show_plot() methods from open-atmos-jupyter-utils
entry: notebooks_using_jupyter_utils
language: python
stages: [pre-commit]
types: [jupyter]
Loading
Loading