diff --git a/noxfile.py b/noxfile.py index 455e3ff27..1cbbd08f9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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) @@ -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: @@ -41,6 +43,8 @@ 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") @@ -48,6 +52,8 @@ def plots(session): @nox.session def integration(session): + """Run the integration tests.""" + session.install("setuptools", "wheel") session.install("-e", ".[all,dev]", silent=False) session.run("pytest", "--integration") @@ -55,6 +61,7 @@ def integration(session): @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) @@ -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) @@ -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") @@ -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") @@ -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") @@ -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")