@@ -15,54 +15,28 @@ extras =
15
15
testing
16
16
commands = pytest {posargs}
17
17
18
- [testenv:docs-{update,clean}-{ alabaster,rtd,pydata,sbt,furo}]
18
+ [testenv:docs-{alabaster,rtd,pydata,sbt,furo}]
19
19
description =
20
- clean: Run documentation build for this theme (removing existing builds)
21
- update: Run documentation build for this theme (reusing existing builds)
20
+ Run documentation build for this theme
22
21
extras =
23
22
rtd
24
23
rtd: theme_rtd
25
24
pydata: theme_pydata
26
25
sbt: theme_sbt
27
26
furo: theme_furo
28
- allowlist_externals =
29
- clean: rm
30
- echo
27
+ allowlist_externals = echo
28
+ passenv =
29
+ BUILDER
30
+ CLEAN
31
+ TERM
31
32
setenv =
32
- update: SKIP_APIDOC = true
33
33
alabaster: SPHINX_THEME = alabaster
34
34
rtd: SPHINX_THEME = sphinx_rtd_theme
35
35
pydata: SPHINX_THEME = pydata_sphinx_theme
36
36
sbt: SPHINX_THEME = sphinx_book_theme
37
37
furo: SPHINX_THEME = furo
38
+ commands_pre =
39
+ python -c " import shutil; shutil.rmtree('docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:}', ignore_errors=True) if '{env:CLEAN:}' else None"
38
40
commands =
39
- clean: rm -rf docs/_build/{posargs:html}
40
- sphinx-build -nW --keep-going -b {posargs:html} docs/ docs/_build/{posargs:html}
41
- commands_post = echo " open docs/_build/{posargs:html}/index.html"
42
-
43
- [testenv:docs-live-{alabaster,rtd,pydata,sbt,furo}]
44
- description = Start documentation autobuild for this theme
45
- extras =
46
- rtd
47
- rtd: theme_rtd
48
- pydata: theme_pydata
49
- sbt: theme_sbt
50
- furo: theme_furo
51
- deps =
52
- pre-commit
53
- sphinx-autobuild
54
- setenv =
55
- alabaster: SPHINX_THEME = alabaster
56
- rtd: SPHINX_THEME = sphinx_rtd_theme
57
- pydata: SPHINX_THEME = pydata_sphinx_theme
58
- sbt: SPHINX_THEME = sphinx_book_theme
59
- furo: SPHINX_THEME = furo
60
- commands =
61
- sphinx-autobuild \
62
- --watch sphinx_design \
63
- --watch style \
64
- --pre-build " npm run css" \
65
- --re-ignore sphinx_design/compiled/.* \
66
- --re-ignore docs/_build/.* \
67
- --port 0 --open-browser \
68
- -n -b {posargs:html} docs/ docs/_build/{posargs:html}
41
+ sphinx-build -nW --keep-going {posargs} -b {env:BUILDER:html} docs/ docs/_build/{env:BUILDER:html}/{env:SPHINX_THEME:}
42
+ commands_post = echo " open docs/_build//{env:BUILDER:html}/{env:SPHINX_THEME:}/index.html"
0 commit comments