Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notebooks to examples nox session #273

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading