Skip to content

Commit

Permalink
Merge pull request #317 from agriyakhetarpal/install-seed-packages
Browse files Browse the repository at this point in the history
Install seed packages (`setuptools` and `wheel`)
  • Loading branch information
BradyPlanden authored May 9, 2024
2 parents 490273b + 10e68f2 commit 7825f1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ codesigned binaries and source distributions via `sigstore-python`.

## Bug Fixes

- [#317](https://github.com/pybop-team/PyBOP/pull/317) - Installs seed packages into `nox` sessions, ensuring that scheduled tests can pass.
- [#308](https://github.com/pybop-team/PyBOP/pull/308) - Enables testing on both macOS Intel and macOS ARM (Silicon) runners and fixes the scheduled tests.
- [#299](https://github.com/pybop-team/PyBOP/pull/299) - Bugfix multiprocessing support for Linux, MacOS, Windows (WSL) and improves coverage.
- [#270](https://github.com/pybop-team/PyBOP/pull/270) - Updates PR template.
Expand Down
12 changes: 12 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

@nox.session
def unit(session):
session.install("setuptools", "wheel")
session.install("-e", ".[all,dev]", silent=False)
if PYBOP_SCHEDULED:
session.run("pip", "install", f"pybamm=={PYBAMM_VERSION}", silent=False)
Expand All @@ -22,6 +23,7 @@ def unit(session):

@nox.session
def coverage(session):
session.install("setuptools", "wheel")
session.install("-e", ".[all,dev]", silent=False)
session.install("pip")
if PYBOP_SCHEDULED:
Expand All @@ -41,20 +43,25 @@ def coverage(session):

@nox.session
def plots(session):
"""Run the tests that generate plots."""
session.install("setuptools", "wheel")
session.install("-e", ".[plot,dev]", silent=False)
session.install("pip")
session.run("pytest", "--plots", "-n", "0")


@nox.session
def integration(session):
"""Run the integration tests."""
session.install("setuptools", "wheel")
session.install("-e", ".[all,dev]", silent=False)
session.run("pytest", "--integration")


@nox.session
def examples(session):
"""Run the examples and notebooks"""
session.install("setuptools", "wheel")
session.install("-e", ".[all,dev]", silent=False)
session.run("pytest", "--examples")
notebooks(session)
Expand All @@ -63,6 +70,7 @@ def examples(session):
@nox.session
def notebooks(session):
"""Run the Jupyter notebooks."""
session.install("setuptools", "wheel")
session.install("-e", ".[all,dev]", silent=False)
if PYBOP_SCHEDULED:
session.run("pip", "install", f"pybamm=={PYBAMM_VERSION}", silent=False)
Expand Down Expand Up @@ -92,6 +100,7 @@ def run_doc_tests(session):
Checks if the documentation can be built, runs any doctests (currently not
used).
"""
session.install("setuptools", "wheel")
session.install("-e", ".[plot,docs,dev]", silent=False)
session.run("pytest", "--docs", "-n", "0")

Expand All @@ -103,6 +112,7 @@ def lint(session):
Credit: PyBaMM Team
"""
session.install("setuptools", "wheel")
session.install("pre-commit", silent=False)
session.run("pre-commit", "run", "--all-files")

Expand All @@ -121,6 +131,7 @@ def run_quick(session):
@nox.session
def benchmarks(session):
"""Run the benchmarks."""
session.install("setuptools", "wheel")
session.install("-e", ".[all,dev]", silent=False)
session.install("asv[virtualenv]")
session.run("asv", "run", "--show-stderr", "--python=same")
Expand All @@ -132,6 +143,7 @@ def docs(session):
Build the documentation and load it in a browser tab, rebuilding on changes.
Credit: PyBaMM Team
"""
session.install("setuptools", "wheel")
envbindir = session.bin
session.install("-e", ".[all,docs]", silent=False)
session.chdir("docs")
Expand Down

0 comments on commit 7825f1a

Please sign in to comment.