Skip to content

Commit

Permalink
Add nox sesson to check example notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Aug 17, 2024
1 parent 3feeccd commit 05b6cdf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ def test_cli(session: nox.Session) -> None:
session.run(PROJECT, "--help")


@nox.session(name="check-notebooks", python=PYTHON_VERSIONS[-1])
def check_notebooks(session: nox.Session) -> None:
"""Run the example notebooks."""
session.install(".[testing,examples]")
session.install("nbmake")

args = [
"examples",
"--nbmake",
"--nbmake-kernel=python3",
"--nbmake-timeout=3000",
"-vvv",
] + session.posargs

session.run("pytest", *args)


@nox.session
def lint(session: nox.Session) -> None:
"""Clean lint and assert style."""
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ addopts = """
--durations 16
--doctest-modules
-vvv
--ignore-glob=examples/*.py
"""
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
Expand Down

0 comments on commit 05b6cdf

Please sign in to comment.