From 66c61741bda1acb136fea58b4d7e37db4a6b6b70 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Sat, 6 Apr 2024 11:16:46 +0100 Subject: [PATCH 1/3] Add notebooks to examples nox session, updt workflows --- .github/workflows/scheduled_tests.yaml | 8 ++++---- .github/workflows/test_on_push.yaml | 4 ---- noxfile.py | 4 +++- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/scheduled_tests.yaml b/.github/workflows/scheduled_tests.yaml index 5066ede7..9cd68e62 100644 --- a/.github/workflows/scheduled_tests.yaml +++ b/.github/workflows/scheduled_tests.yaml @@ -87,8 +87,8 @@ jobs: - name: Unit tests with nox run: python -m nox -s coverage - - name: Run notebooks with nox - run: python -m nox -s notebooks + - name: Run examples with nox + run: python -m nox -s examples # M-series Mac Mini build-apple-mseries: @@ -112,14 +112,14 @@ jobs: pyenv install ${{ matrix.python_version }} -s pyenv virtualenv ${{ matrix.python_version }} pybop-${{ matrix.python_version }}-${{ matrix.pybamm_version }} - - name: Install dependencies & run unit + notebook tests + - name: Install dependencies & run tests shell: bash run: | eval "$(pyenv init -)" pyenv activate pybop-${{ matrix.python_version }}-${{ matrix.pybamm_version }} python -m pip install --upgrade pip nox python -m nox -s coverage - python -m nox -s notebooks + python -m nox -s examples - name: Uninstall pyenv-virtualenv & python if: always() diff --git a/.github/workflows/test_on_push.yaml b/.github/workflows/test_on_push.yaml index af98e8ad..c58ef5e5 100644 --- a/.github/workflows/test_on_push.yaml +++ b/.github/workflows/test_on_push.yaml @@ -113,10 +113,6 @@ jobs: run: | nox -s examples - - name: Run notebooks - run: | - nox -s notebooks - # Runs only on Ubuntu with Python 3.12 check_coverage: needs: style diff --git a/noxfile.py b/noxfile.py index abd72265..4ebdcfec 100644 --- a/noxfile.py +++ b/noxfile.py @@ -51,13 +51,15 @@ def integration(session): @nox.session def examples(session): + """Run the examples and notebooks""" session.install("-e", ".[all,dev]", silent=False) session.run("pytest", "--examples") + notebooks(session) @nox.session def notebooks(session): - """Run the examples tests for Jupyter notebooks.""" + """Run the Jupyter notebooks.""" session.install("-e", ".[all,dev]", silent=False) if PYBOP_SCHEDULED: session.run("pip", "install", f"pybamm=={PYBAMM_VERSION}", silent=False) From 9abc25c10e76f2fb0a4607735bb79b6e27c2a7a2 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Sat, 6 Apr 2024 11:20:57 +0100 Subject: [PATCH 2/3] updt changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1453728d..b0a3bbc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,12 @@ ## Features +- [#273](https://github.com/pybop-team/PyBOP/pull/273) - Adds notebooks to nox examples session and updates CI workflows for change. - [#241](https://github.com/pybop-team/PyBOP/pull/241) - Adds experimental circuit model fitting notebook with LG M50 data. - [#268](https://github.com/pybop-team/PyBOP/pull/268) - Fixes the GitHub Release artifact uploads, allowing verification of codesigned binaries and source distributions via `sigstore-python`. - [#79](https://github.com/pybop-team/PyBOP/issues/79) - Adds BPX as a dependency and imports BPX support from PyBaMM. -- [#267](https://github.com/pybop-team/PyBOP/pull/267) - Add classifiers to pyproject.toml, update project.urls. +g- [#267](https://github.com/pybop-team/PyBOP/pull/267) - Add classifiers to pyproject.toml, update project.urls. - [#195](https://github.com/pybop-team/PyBOP/issues/195) - Adds the Nelder-Mead optimiser from PINTS as another option. ## Bug Fixes From 97f1f7c8435422c1320214c64c3cd174629745a9 Mon Sep 17 00:00:00 2001 From: Brady Planden Date: Mon, 8 Apr 2024 14:20:04 +0100 Subject: [PATCH 3/3] fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0a3bbc5..614c39a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - [#268](https://github.com/pybop-team/PyBOP/pull/268) - Fixes the GitHub Release artifact uploads, allowing verification of codesigned binaries and source distributions via `sigstore-python`. - [#79](https://github.com/pybop-team/PyBOP/issues/79) - Adds BPX as a dependency and imports BPX support from PyBaMM. -g- [#267](https://github.com/pybop-team/PyBOP/pull/267) - Add classifiers to pyproject.toml, update project.urls. +- [#267](https://github.com/pybop-team/PyBOP/pull/267) - Add classifiers to pyproject.toml, update project.urls. - [#195](https://github.com/pybop-team/PyBOP/issues/195) - Adds the Nelder-Mead optimiser from PINTS as another option. ## Bug Fixes