forked from PlasmaPy/PlasmaPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
133 lines (118 loc) · 4.63 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
125
126
127
128
129
130
131
132
133
[tox]
envlist = py312-pins-pytest_all,build_docs
isolated_build = True
[testenv]
package = wheel
wheel_build_env = .pkg
allowlist_externals =
/bin/bash
/usr/bin/bash
cat
echo
passenv = GH_TOKEN
setenv =
MPLBACKEND = agg
COLUMNS = 80
PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.anaconda.org/scipy-wheels-nightly/simple}
PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:https://pypi.org/simple}
PYTEST_COMMAND = pytest --pyargs plasmapy --durations=5 --tb=short -n=auto --dist=loadfile
extras = tests
deps =
astropydev: git+https://github.com/astropy/astropy
matplotlibdev: git+https://github.com/matplotlib/matplotlib
numpydev: git+https://github.com/numpy/numpy
sphinxdev: git+https://github.com/sphinx-doc/sphinx
xarraydev: git+https://github.com/pydata/xarray
pytest_cov_all: pytest-cov
# pytest-github-actions-annotate-failures
commands =
pytest_all: {env:PYTEST_COMMAND} {posargs}
pytest_skipslow: {env:PYTEST_COMMAND} {posargs} -m "not slow"
pytest_doctests_all: {env:PYTEST_COMMAND} {posargs} --doctest-modules --doctest-continue-on-failure
pytest_doctests_skipslow: {env:PYTEST_COMMAND} {posargs} --doctest-modules --doctest-continue-on-failure -m "not slow"
pytest_cov_all: {env:PYTEST_COMMAND} {posargs} --cov=plasmapy --cov-report=xml --cov-config={toxinidir}{/}pyproject.toml --cov-append --cov-report xml:coverage.xml
description =
run tests
astropydev: with the development version of Astropy
matplotlibdev: with the development version of matplotlib
numpydev: with the development version of NumPy
sphinxdev: with the development version of Sphinx
xarraydev: with the development version of xarray
lowest_direct: with lowest versions of direct dependencies
[testenv:py312-pins]
basepython = python3.12
deps = -r{toxinidir}/requirements/requirements_tests_py312.txt
[testenv:py311-pins]
basepython = python3.11
deps = -r{toxinidir}/requirements/requirements_tests_py311.txt
[testenv:py310-pins]
basepython = python3.10
deps = -r{toxinidir}/requirements/requirements_tests_py310.txt
[testenv:py310-lowest_direct]
basepython = python3.10
deps = -r{toxinidir}/requirements/requirements_tests_lowest_direct_py310.txt
[testenv:build_docs]
changedir = {toxinidir}
setenv =
HOME = {envtmpdir}
PYDEVD_DISABLE_FILE_VALIDATION=1
commands =
sphinx-build docs docs{/}_build{/}html -W -n --keep-going -b html {posargs}
deps = -r{toxinidir}/requirements/requirements_docs_py312.txt
[testenv:build_docs_no_examples]
changedir = {toxinidir}
extras = docs
setenv =
HOME = {envtmpdir}
commands =
sphinx-build -D nbsphinx_execute='never' docs docs{/}_build{/}html -b html {posargs}
[testenv:build_docs-sphinxdev]
changedir = {toxinidir}
extras = docs
setenv =
HOME = {envtmpdir}
commands = sphinx-build docs docs{/}_build{/}html -W -n --keep-going -b html {posargs}
deps =
git+https://github.com/sphinx-doc/sphinx
description =
sphinxdev: with the development version of Sphinx
[testenv:linkcheck]
changedir = {toxinidir}
setenv =
HOME = {envtmpdir}
PYDEVD_DISABLE_FILE_VALIDATION=1
commands =
sphinx-build docs docs{/}_build{/}html -W -n -q --keep-going -b linkcheck {posargs}
deps = -r{toxinidir}/requirements.txt
[testenv:mypy]
deps =
mypy >= 1.9.0
commands =
mypy plasmapy --install-types --non-interactive --show-error-context --show-error-code-links --pretty
[testenv:py310-lowest_direct-pypi-import]
basepython = python3.10
extras =
deps =
commands = python -c 'import plasmapy'
[testenv:requirements]
deps =
uv
changedir = {toxinidir}
setenv =
BUILD_REQS = python -m uv pip compile pyproject.toml --upgrade
commands =
{env:BUILD_REQS} -p 3.12 -o requirements.txt --all-extras
{env:BUILD_REQS} -p 3.12 -o requirements/requirements_docs_py312.txt --extra docs --no-annotate --no-header
{env:BUILD_REQS} -p 3.12 -o requirements/requirements_tests_py312.txt --extra tests --no-annotate --no-header
{env:BUILD_REQS} -p 3.11 -o requirements/requirements_tests_py311.txt --extra tests --no-annotate --no-header
{env:BUILD_REQS} -p 3.10 -o requirements/requirements_tests_py310.txt --extra tests --no-annotate --no-header
# Using uv's `--resolution=lowest-direct` flag yields the lowest
# versions of PlasmaPy's direct dependencies but the newest allowed
# versions of all other dependencies. Using "--resolution=lowest"
# was unsuccessful because some packages didn't list minimum
# versions of every dependency.
{env:BUILD_REQS} -p 3.10 -o requirements/requirements_tests_lowest_direct_py310.txt --extra tests --resolution=lowest-direct
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase