Skip to content

Commit

Permalink
Merge pull request #273 from pybop-team/272-combine-examples-and-note…
Browse files Browse the repository at this point in the history
…books-nox-session

Add notebooks to examples nox session
  • Loading branch information
BradyPlanden authored Apr 8, 2024
2 parents 5c334aa + aa056aa commit 4b09729
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/scheduled_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- [#273](https://github.com/pybop-team/PyBOP/pull/273) - Adds notebooks to nox examples session and updates CI workflows for change.
- [#250](https://github.com/pybop-team/PyBOP/pull/250) - Adds DFN, MPM, MSMR models and moves multiple construction variables to BaseEChem. Adds exception catch on simulate & simulateS1.
- [#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
Expand Down
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b09729

Please sign in to comment.