-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
64 lines (59 loc) · 1.75 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
55
56
57
58
59
60
61
62
63
64
[tox]
description = Default tox environments list
envlist =
code-style
doc-style
doc-{links,html,pdf,clean,serve}
dist
skip_missing_interpreters = true
isolated_build = true
isolated_build_env = build
[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
{code-style,doc-style,doc-links,doc-html}: python3
setenv =
PYTHONUNBUFFERED = yes
DOCUMENTATION_CNAME = sphinxdocs.ansys.com
passenv = *
[testenv:code-style]
description = check project code style
skip_install = true
deps =
pre-commit
commands =
pre-commit install
pre-commit run --all-files --show-diff-on-failure
[testenv:doc-style]
description = Checks project documentation style
skip_install = true
allowlist_externals =
vale
commands =
vale sync --config="{toxinidir}/doc/.vale.ini"
vale --config="{toxinidir}/doc/.vale.ini" "{toxinidir}/doc"
[testenv:doc-{clean,links,html,pdf,serve}]
description = Checks documentation links and pages generates properly
skip_install =
clean: true
allowlist_externals =
pdf: pdflatex
extras = doc
setenv =
SOURCE_DIR = doc/source
BUILD_DIR = doc/_build
links: BUILDER = linkcheck
html: BUILDER = html
pdf: BUILDER = latex
links,html,pdf: BUILDER_OPTS = --color -v -j auto -W --keep-going
commands =
links,html,pdf: sphinx-build -d "{toxworkdir}/doc_doctree" {env:SOURCE_DIR} "{toxinidir}/{env:BUILD_DIR}/{env:BUILDER}" {env:BUILDER_OPTS} -b {env:BUILDER}
clean: python -c "import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)" "{toxinidir}/{env:BUILD_DIR}"
serve: stb serve "{toxinidir}/{env:SOURCE_DIR}/"
[testenv:dist]
description = Checks project distribution
skip_install = true
deps =
build
commands =
python -m build {toxinidir}