From 040a99f8c934a4bc970a63f9be4009dda9b358c3 Mon Sep 17 00:00:00 2001 From: Will Barnes Date: Tue, 27 Aug 2024 18:07:14 -0400 Subject: [PATCH] add gallery build to tox --- tox.ini | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index 42b9ac8..07e4dec 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ min_version = 4.0 envlist = py{310,311,312}-test py10-test-oldestdeps - build_docs + build_docs{,-gallery} [testenv] # tox environments are constructed with so-called 'factors' (or terms) @@ -55,10 +55,20 @@ commands = pytest --pyargs ebtelplusplus --cov ebtelplusplus --cov-report xml:coverage.xml --cov-report term-missing {posargs} [testenv:build_docs] +changedir = docs description = invoke sphinx-build to build the HTML docs -change_dir = - docs -extras = - docs +extras = docs commands = - sphinx-build -j auto --color -W --keep-going -b html -d _build/.doctrees . _build/html {posargs} + pip freeze --all --no-input + sphinx-build \ + --color \ + -W \ + --keep-going \ + -b html \ + -d _build/.doctrees \ + . \ + _build/html \ + gallery: -D plot_gallery=1 \ + !gallery: -D plot_gallery=0 \ + {posargs} + python -c 'import pathlib; print("Documentation available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "docs" / "_build" / "index.html"))'