From 758a49a7daa9baf42fe583587505cdc0079fccbd Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Sat, 26 Sep 2026 21:38:33 -0600 Subject: [PATCH 1/3] Add nbmake dependency --- pyproject.toml | 1 + requirements-testing.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 616b8a2..dbe4203 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,7 @@ testing = [ "isort", "ruff", "bmi-tester", + "nbmake", ] [tool.setuptools.dynamic] diff --git a/requirements-testing.txt b/requirements-testing.txt index d817a46..8608def 100644 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -2,6 +2,7 @@ black bmi-tester coveralls isort +nbmake pytest pytest-cov ruff From 49fd8c9e67fc153be8ab9c8c66a70b9f9fce9c76 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Sat, 26 Sep 2026 21:39:16 -0600 Subject: [PATCH 2/3] Add notebook test to CI test workflow --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1bf29d..ac46e4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: run: | pytest --cov=heat --cov-report=xml:./coverage.xml -vvv bmi-test heat:BmiHeat --config-file=${GITHUB_WORKSPACE}/examples/heat.yaml --root-dir=examples -vvv + pytest examples --nbmake --nbmake-timeout=3000 --nbmake-kernel=python3 -v - name: Coveralls if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' From 8a5ab71fb677d853410e63a66b12b5e8671b2f56 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Sat, 26 Sep 2026 21:39:38 -0600 Subject: [PATCH 3/3] Add nox session to test notebooks --- noxfile.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/noxfile.py b/noxfile.py index bcb4d20..af811b0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -25,6 +25,23 @@ def test(session: nox.Session) -> None: session.run("coverage", "report", "--ignore-errors", "--show-missing") +@nox.session(name="test-examples") +def test_examples(session: nox.Session) -> None: + """Run the example notebooks.""" + session.install(".[testing]") + + session.run( + "pytest", + "examples", + "--nbmake", + "--nbmake-timeout", + "3000", + "--nbmake-kernel", + "python3", + "-v", + ) + + @nox.session def lint(session: nox.Session) -> None: """Look for lint."""