Skip to content

Commit

Permalink
Install seed packages (setuptools and wheel)
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed May 8, 2024
1 parent 490273b commit ecca2f1
Showing 1 changed file with 12 additions and 0 deletions.
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 ecca2f1

Please sign in to comment.