-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathtox.ini
More file actions
128 lines (113 loc) · 2.89 KB
/
tox.ini
File metadata and controls
128 lines (113 loc) · 2.89 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[tox]
envlist =
check
docs
nightlies
nightlies-xarray
{minimal,xarray,full}{,-coverage}
# nightlies-xarray is for github actions to run the job in the respective python
# if env var xarray is set
# See https://tox.readthedocs.io/en/latest/example/package.html#flit
isolated_build = True
isolated_build_env = build
labels =
dev = check, cleandocs, docs, viewdocs, full, minimal, xarray, nightlies
[gh-actions]
python =
3.12: coverage
3.13: coverage, nightlies
3.14: coverage
[gh-actions:env]
JOB =
minimal: minimal
xarray: xarray
full: full
[testenv]
basepython =
# See https://github.com/tox-dev/tox/issues/1548
{minimal,xarray,full,nightlies,check,docs,cleandocs,viewdocs}: python3
setenv =
PYTHONUNBUFFERED = yes
PYTEST_EXTRA_ARGS = -s
coverage: PYTEST_EXTRA_ARGS = --cov --cov-report xml --cov-report term
passenv =
*
allowlist_externals = pytest
commands =
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:}
[testenv:full]
description = Run tests with all dependencies (importorskip will raise on missing dep)
extras =
test-xarray
xarray
numba
setenv =
ARVIZ_REQUIRE_ALL_DEPS=TRUE
[testenv:full-coverage]
base =
full
testenv
[testenv:minimal]
description = Run tests with minimal install (numpy+scipy only)
extras = test
[testenv:minimal-coverage]
base =
minimal
testenv
[testenv:xarray]
description = Run tests with arviz-stats[xarray] install
extras =
test-xarray
xarray
[testenv:xarray-coverage]
base =
xarray
testenv
[testenv:nightlies]
description = Run xarray test job with nightly pre-releases of scientific python packages
base =
xarray
testenv
install_command = python -I -m pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple {opts} {packages}
pip_pre = true
# Setting this env var following arviz-base in case we want to skip some tests in nightlies
setenv =
NIGHTLIES=TRUE
[testenv:nightlies-xarray]
base =
nightlies
xarray
testenv
[testenv:check]
description = Perform style checks
deps =
build
pre-commit
pylint
skip_install = true
commands =
pre-commit install
pre-commit run --all-files --show-diff-on-failure
python -m build
[testenv:docs]
description = Build HTML docs
setenv =
READTHEDOCS_PROJECT = arviz_stats
READTHEDOCS_VERSION = latest
extras =
doc
xarray
numba
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs/source "{toxworkdir}/docs_out" --color -v -bhtml
[testenv:cleandocs]
description = Clean HTML doc build outputs
skip_install = true
allowlist_externals = rm
commands =
rm -r "{toxworkdir}/docs_out" "{toxworkdir}/docs_doctree" "{toxworkdir}/jupyter_execute" docs/source/api/generated
[testenv:viewdocs]
description = View HTML docs with the default browser
skip_install = true
commands =
python -m webbrowser "{toxworkdir}/docs_out/index.html"