-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
89 lines (82 loc) · 1.91 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[tox]
envlist =
check
docs
py39
py310
py311
# See https://tox.readthedocs.io/en/latest/example/package.html#flit
isolated_build = True
isolated_build_env = build
[gh-actions]
python =
3.9: py39
3.10: py310, check, reformat
3.11: py311
[testenv]
basepython =
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
# See https://github.com/tox-dev/tox/issues/1548
{check,reformat,docs,cleandocs,viewdocs,build}: python3
setenv =
PYTHONUNBUFFERED = yes
passenv =
*
extras =
test
einops
numba
allowlist_externals =
pytest
commands =
pytest tests/ --cov --cov-report xml --cov-report term {posargs:-v}
[testenv:check]
description = perform style checks
skip_install = true
deps =
black
isort
pylint
pydocstyle
toml
commands =
pylint src tests
isort --check-only --diff --project xarray_einstats --section-default THIRDPARTY src tests
black --check --diff src tests
pydocstyle src
[testenv:reformat]
description = automatic code formatting
skip_install = true
deps =
black
isort
toml
commands =
isort --project xarray_einstats --section-default THIRDPARTY src tests
black src tests
[testenv:docs]
description = build HTML docs
setenv =
READTHEDOCS_PROJECT = xarray_einstats
READTHEDOCS_VERSION = latest
extras =
doc
einops
numba
allowlist_externals = sphinx-build
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -v -bhtml
[testenv:cleandocs]
description = clean HTML outputs docs
skip_install = true
allowlist_externals = rm
commands =
rm -r "{toxworkdir}/docs_out" "{toxworkdir}/docs_doctree" "{toxworkdir}/jupyter_execute" docs/source/api/generated docs/source/contributing/generated
[testenv:viewdocs]
description = open HTML docs
skip_install = true
commands =
python -m webbrowser "{toxworkdir}/docs_out/index.html"