Skip to content

Commit

Permalink
fix rtd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jun 30, 2023
1 parent 11cd724 commit 283f349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/rtd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ jobs:

- name: Run tutorial and example notebooks
working-directory: autotest
run: pytest -v -n auto test_notebooks.py
run: |
pytest -v -n auto test_notebooks.py --keep notebooks
mv notebooks/**/*.ipynb ../.docs/Notebooks
- name: Upload notebooks artifact for ReadtheDocs
if: github.repository_owner == 'modflowpy' && github.event_name == 'push' && runner.os == 'Linux'
Expand Down
6 changes: 4 additions & 2 deletions autotest/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_notebooks(pattern=None, exclude=None):
get_notebooks(pattern="tutorial", exclude=["mf6_lgr"])
+ get_notebooks(pattern="example"),
)
def test_notebooks(notebook, function_tmpdir):
def test_notebooks(function_tmpdir, notebook):
args = [
"jupytext",
"--from",
Expand All @@ -40,7 +40,9 @@ def test_notebooks(notebook, function_tmpdir):
"--execute",
notebook,
"-o",
str(function_tmpdir / Path(notebook).name.replace(".py", ".ipynb"))
str(
function_tmpdir / Path(notebook).name.replace(".py", ".ipynb")
),
]
stdout, stderr, returncode = run_cmd(*args, verbose=True)

Expand Down

0 comments on commit 283f349

Please sign in to comment.