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

Install seed packages (setuptools and wheel) #317

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
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
Loading