| # To use tox, see https://tox.readthedocs.io | |
| # Simply pip or conda install tox | |
| # If you use conda, you may also want to install tox-conda | |
| # then run `tox` or `tox -- {pytest args}` | |
| # To run in parallel using `tox -p` (this does not appear to work for this repo) | |
| # To rebuild the tox environment, for example when dependencies change, use | |
| # `tox -r` | |
| # Note: if the following error is encountered: `ImportError while loading conftest` | |
| # then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete` | |
| [tox] | |
| envlist = py39-sphinx5 | |
| [testenv] | |
| usedevelop = true | |
| passenv = TERM # To make terminal coloring / other variables pass through | |
| [testenv:py{38,39}-sphinx{5,6}] | |
| extras = testing | |
| deps = | |
| sphinx5: sphinx>=5,<6 | |
| sphinx6: sphinx>=6,<7 | |
| commands = pytest {posargs} | |
| [testenv:docs-{update,clean}] | |
| extras = sphinx | |
| passenv = | |
| SKIP_CONTRIBUTE | |
| SKIP_TEAM | |
| whitelist_externals = | |
| rm | |
| echo | |
| commands = | |
| clean: rm -rf docs/_build | |
| sphinx-build -nW --keep-going -b {posargs:html} docs/ docs/_build/{posargs:html} | |
| commands_post = echo "open file://{toxinidir}/docs/_build/{posargs:html}/index.html" | |
| [testenv:docs-live] | |
| description = Build the documentation and launch browser | |
| extras = sphinx | |
| deps = | |
| sphinx-autobuild | |
| setenv = | |
| SKIP_CONTRIBUTE = true | |
| SKIP_TEAM = true | |
| commands = | |
| sphinx-autobuild \ | |
| --re-ignore _build/.* \ | |
| --re-ignore gallery.txt \ | |
| --re-ignore contributing.md \ | |
| --port 0 --open-browser \ | |
| -n -b {posargs:html} docs/ docs/_build/{posargs:html} | |