-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathtox.ini
124 lines (118 loc) · 3.15 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
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
[tox]
min_version = 4.24.1
env_list =
lint
docs
notebooks
doctests
py311-extras-numpy
py312-extras-sbck
py313-extras-lmoments
labels =
static = lint
test = py311-extras-numpy, py312-extras-sbck, py313-extras-lmoments
special = docs, notebooks, doctests
requires =
pip >= 25.0
flit >=3.10.1,<4.0
opts =
--verbose
[gh]
python =
3.10 = py310-coverage-extras
3.11 = py311-coverage-extras-sbck-lmoments
3.12 = py312-coverage-extras-numpy
3.13 = py313-extras-lmoments
[testenv:lint]
description = Run code quality compliance tests under {basepython}
skip_install = True
extras =
deps =
blackdoc ==0.3.9
codespell >=2.4.1
deptry >=0.23.0
flake8 >=7.1.1
flake8-rst-docstrings ==0.3.0
numpydoc >=1.8.0
ruff >=0.9.6
vulture >=2.11
yamllint >=1.35.1
commands_pre =
commands =
make lint
commands_post =
allowlist_externals =
make
[testenv:docs]
description = Build the documentation with makefile under {basepython}
setenv =
PYTHONPATH = {toxinidir}
READTHEDOCS = 1
deps =
docs
commands_pre =
commands =
make docs
commands_post =
allowlist_externals =
env
make
[testenv:notebooks{-prefetch,}]
description = Run notebooks with pytest under {basepython}
extras =
all
deps =
lmoments3
commands =
pytest --no-cov --nbval --dist=loadscope --rootdir=tests/ --ignore=docs/notebooks/example.ipynb docs/notebooks
commands_post =
[testenv:doctests{-prefetch,}]
description = Run doctests with pytest under {basepython}
commands =
python -c 'from xclim.testing.utils import run_doctests; run_doctests()'
commands_post =
[testenv]
description = Run tests with pytest under {basepython}
setenv =
COV_CORE_SOURCE =
PYTEST_ADDOPTS = --numprocesses=logical --durations=10
coverage: PYTEST_ADDOPTS = --numprocesses=logical --durations=10 --cov=xclim --cov-report=term-missing
Xfrozen_modules = off
passenv =
CI
CONDA_EXE
COVERALLS_*
GITHUB_*
LD_LIBRARY_PATH
SKIP_NOTEBOOKS
XCLIM_*
extras =
dev
extras: extras
deps =
coverage: coveralls>=4.0.1
lmoments: lmoments3
numpy: numpy>=1.24,<2.0
upstream: -r CI/requirements_upstream.txt
install_command = python -m pip install --no-user {opts} {packages}
download = True
commands_pre =
sbck: python -c 'print("The sbck dependency requires the \"libeigen3-dev\" package to be installed on the system.")'
sbck: python -m pip install pybind11
sbck: python -m pip install sbck
python -m pip list
xclim show_version_info
python -m pip check
xclim --help
prefetch: xclim prefetch_testing_data
commands =
!offline: pytest {posargs}
; Prevent socket connections (except for unix sockets for async support)
offline: python -c 'print("Running offline tests with positional arguments: --disable-socket --allow-unix-socket --m \"not requires_internet\"")'
offline: python -c 'print("These can be overwritten with: tox -e offline -- -m \"some other marker statement\"")'
offline: pytest --disable-socket --allow-unix-socket {posargs:-m 'not requires_internet'}
commands_post =
coverage: - coveralls
allowlist_externals =
git
xclim