-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
48 lines (45 loc) · 1.25 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
[tox]
description = Default tox environments list
envlist =
style,{py38,py39,py310,py311}{,-coverage},doc
skip_missing_interpreters = true
isolated_build = true
isolated_build_env = build
[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py310: python3.10
py311: python3.11
py312: python3.12
py: python3
{style,reformat,doc}: python3
setenv =
PYTHONUNBUFFERED = yes
coverage: PYTEST_EXTRA_ARGS = --cov=ansys.additive --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html
extras = tests
commands =
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv}
[testenv:style]
description = Checks project code style
skip_install = true
deps =
pre-commit
commands =
pre-commit install
pre-commit run --all-files --show-diff-on-failure
[testenv:doc]
description = Check if documentation generates properly
setenv =
GENERATING_DOCS = 1
AWP_ROOT251 = {env:AWP_ROOT251:}
BUILD_EXAMPLES_LONG = true
PLOT_GALLERY = false
passenv =
BUILD_API
BUILD_EXAMPLES
BUILD_EXAMPLES_LONG
ANSYS_ADDITIVE_ADDRESS
PLOT_GALLERY
extras = doc
commands =
sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/_build/html" --color -v -bhtml