Skip to content

Commit ed0b6a5

Browse files
authored
docs: install exes in conf.py (#75)
Followup to #74, the examples need libmf6
1 parent f04dff7 commit ed0b6a5

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

docs/conf.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
# https://www.sphinx-doc.org/en/master/usage/configuration.html
55

66
import os
7+
from pathlib import Path
8+
from flopy.utils.get_modflow import run_main as get_modflow
79
import sys
810
sys.path.insert(0, os.path.abspath('../'))
11+
from modflowapi import __version__
12+
13+
# -- Determine if this is a development or release version ------------------
14+
branch_or_version = __version__ if "dev" not in __version__ else "develop"
915

1016
# -- Project information -----------------------------------------------------
1117
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@@ -33,4 +39,9 @@
3339
# -- nbsphinx configuration -------------------------------------------------
3440
nbsphinx_custom_formats = {
3541
'.py': ['jupytext.reads', {'fmt': 'py:light'}],
36-
}
42+
}
43+
44+
# -- Install MODFLOW --------------------------------------------------------
45+
bindir = Path.cwd() / "examples" / "notebooks"
46+
repo = "modflow6-nightly-build" if branch_or_version == "develop" else "modflow6"
47+
get_modflow(str(bindir), repo=repo)

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ lint = [
5959
"ruff",
6060
]
6161
docs = [
62+
"modflowapi[test]",
6263
"sphinx",
6364
"sphinx-rtd-theme",
6465
"myst-parser",
6566
"jupyter",
6667
"jupytext",
6768
"nbsphinx",
68-
"ipython"
69+
"ipython",
70+
"flopy",
6971
]
7072

7173
[project.urls]

0 commit comments

Comments
 (0)