Skip to content

Commit 8f5c2e7

Browse files
authored
docs(rtd): fix tutorials section (#2621)
I broke the tutorial RTD page when trying to add the new mfusg transport tutorials in #2617. Fix it. Correctly ignore the two new notebooks needing attention. And remove examples.rst and tutorials.rst, they're generated when the rtd assets are built.
1 parent 10d0eb7 commit 8f5c2e7

File tree

8 files changed

+10
-260
lines changed

8 files changed

+10
-260
lines changed

.docs/Notebooks/mfusg_transport_tutorial07c_ChainDecay.py renamed to .docs/Notebooks/mfusg_transport_07c_ChainDecay_dev.py

File renamed without changes.
File renamed without changes.

.docs/conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,15 @@
9292
print(" ".join(cmd))
9393
os.system(" ".join(cmd))
9494

95-
# -- convert tutorial scripts and run example notebooks ----------------------
95+
# -- convert and run tutorial and example notebooks ----------------------
9696
if not on_rtd:
97-
nbs_py = Path("Notebooks").glob("*.py")
98-
for py in nbs_py:
97+
for py in Path("Notebooks").glob("*.py"):
98+
if not ("tutorial" in py.name or "example" in py.name):
99+
print(f"skipping {py}")
100+
continue
99101
ipynb = py.with_suffix(".ipynb")
100102
if ipynb.exists():
101-
print(f"{ipynb} already exists, skipping")
103+
print(f"Notebook {ipynb} already exists, skipping")
102104
continue
103105
cmd = ("jupytext", "--to", "ipynb", "--execute", str(py))
104106
print(" ".join(cmd))

.docs/create_rstfiles.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def create_tutorials_rst():
5050
"mf2005": {"title": "MODFLOW-2005", "files": []},
5151
"lgr": {"title": "MODFLOW-LGR", "files": []},
5252
"nwt": {"title": "MODFLOW-NWT", "files": []},
53+
"mfusg": {"title": "MODFLOW USG", "files": []},
5354
"mt3dms": {"title": "MT3DMS", "files": []},
5455
"pest": {"title": "PEST", "files": []},
5556
"misc": {"title": "Miscellaneous", "files": []},

.docs/examples.rst

Lines changed: 0 additions & 151 deletions
This file was deleted.

.docs/main.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FloPy
88

99
.. image:: _images/flopylogo.png
1010

11-
**Documentation for version 3.6.0.dev0**
11+
**Documentation for version 3.10.0.dev4**
1212

1313
Documentation is generated with Sphinx from the `FloPy repository <https://github.com/modflowpy/flopy>`_.
1414

.docs/tutorials.rst

Lines changed: 0 additions & 102 deletions
This file was deleted.

autotest/test_example_notebooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
EXCLUDE = [
1212
"mf6_lgr",
13-
"mfusg_transport_tutorial07c_ChainDecay",
14-
"mfusg_transport_tutorial08_Lake",
13+
"mfusg_transport_07c_ChainDecay",
14+
"mfusg_transport_08_Lake",
1515
]
1616
# skip pyvista notebooks on windows/mac in CI due to persistent issues
1717
# first with offscreen rendering, then with finding pyvista even after

0 commit comments

Comments
 (0)