forked from executablebooks/meta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
54 lines (48 loc) · 1.58 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
44
45
46
47
48
49
50
51
52
53
54
# 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 = docs-live
[testenv]
basepython = python3
skip_install = true
passenv = TERM # To make terminal coloring / other variables pass through
[testenv:docs-{update,clean}]
deps = -rrequirements.txt
setenv =
# GITHUB_TOKEN is used by ghapi to update the issues voting
GITHUB_TOKEN = {env:GITHUB_TOKEN:}
passenv =
SKIP_CONTRIBUTE
SKIP_TEAM
whitelist_externals =
rm
echo
allowlist_externals =
echo
commands =
clean: rm -rf docs/_build
sphinx-build -nW --keep-going -b {posargs:dirhtml} docs/ docs/_build/{posargs:dirhtml}
commands_post = echo "open file://{toxinidir}/docs/_build/{posargs:dirhtml}/index.html"
[testenv:docs-live]
description = Build the documentation and launch browser
deps =
-rrequirements.txt
sphinx-autobuild
black
setenv =
SKIP_CONTRIBUTE = true
SKIP_TEAM = true
GITHUB_TOKEN = {env:GITHUB_TOKEN:}
commands =
sphinx-autobuild \
--re-ignore _build/.* \
--re-ignore gallery.txt \
--port 0 --open-browser \
-n -b {posargs:dirhtml} docs/ docs/_build/{posargs:dirhtml}