forked from executablebooks/sphinx-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
43 lines (40 loc) · 1.24 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# To use tox, see https://tox.readthedocs.io
# (you may also want to install tox-uv)
# then run `tox` or `tox -- {pytest args}`
# run in parallel using `tox -p`
[tox]
envlist = py39
[testenv]
usedevelop = true
[testenv:py{39,310,311,312}]
description = Run unit tests with this Python version
extras =
testing
commands = pytest {posargs}
[testenv:docs-{alabaster,rtd,pydata,sbt,furo,im}]
description =
Run documentation build for this theme
extras =
rtd
rtd: theme_rtd
pydata: theme_pydata
sbt: theme_sbt
furo: theme_furo
im: theme_im
allowlist_externals = echo
passenv =
BUILDER
CLEAN
TERM
setenv =
alabaster: SPHINX_THEME = alabaster
rtd: SPHINX_THEME = sphinx_rtd_theme
pydata: SPHINX_THEME = pydata_sphinx_theme
sbt: SPHINX_THEME = sphinx_book_theme
furo: SPHINX_THEME = furo
im: SPHINX_THEME = sphinx_immaterial
commands_pre =
python -c "import shutil; shutil.rmtree('docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:}', ignore_errors=True) if '{env:CLEAN:}' else None"
commands =
sphinx-build -nW --keep-going {posargs} -b {env:BUILDER:html} docs/ docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:}
commands_post = echo "open docs/_build//{env:BUILDER:html}/{env:SPHINX_THEME:}/index.html"