Skip to content

Commit

Permalink
WIP: ENH: Show tree to see where notebooks are
Browse files Browse the repository at this point in the history
Show tree in tox command to see where notebooks are.
  • Loading branch information
jhlegarreta committed Jan 18, 2025
1 parent 0390932 commit 191a501
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/notebooks/dmri_covariance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
"import numpy as np\n",
"\n",
"from nifreeze.model.gpr import (\n",
" compute_pairwise_angles,\n",
" compute_angles,\n",
" exponential_covariance,\n",
" spherical_covariance,\n",
")\n",
"\n",
"Intentional put to fail\n",
"\n",
"# Use LaTeX for rendering\n",
"mpl.rcParams[\"text.usetex\"] = True\n",
"# load the xfrac package\n",
Expand Down
5 changes: 5 additions & 0 deletions tools/run_notebooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import glob
import subprocess
import sys

sys.exit(subprocess.call(["pytest", "--nbmake"] + glob.glob("docs/notebooks/*.ipynb")))
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ pass_env =
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS
PATH
extras = notebooks
allowlist_externals =
tree
commands =
ls -la {toxinidir}
pytest --nbmake {toxinidir}/docs/notebooks/*ipynb
# pytest --nbmake docs/notebooks/*.ipynb
# not working due to https://github.com/tox-dev/tox/issues/1571
tree {toxinidir}
python {toxinidir}/tools/run_notebooks.py

[testenv:docs]
description = Build documentation site
Expand Down

0 comments on commit 191a501

Please sign in to comment.