forked from PlasmaPy/PlasmaPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
145 lines (136 loc) · 3.73 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
134
135
136
137
138
139
140
141
142
143
144
145
[tox]
envlist = clean,py38,build_docs
isolated_build = True
indexserver =
NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple
[testenv]
allowlist_externals =
/bin/bash
/usr/bin/bash
echo
setenv =
MPLBACKEND = agg
COLUMNS = 180
PYTEST_COMMAND = pytest --pyargs plasmapy --durations=25 -n=auto --dist=loadfile
extras = tests
deps =
astropydev: git+https://github.com/astropy/astropy
matplotlibdev: git+https://github.com/matplotlib/matplotlib
numpydev: :NIGHTLY:numpy
sphinxdev: git+https://github.com/sphinx-doc/sphinx
xarraydev: git+https://github.com/pydata/xarray
cov: pytest-cov
!minimal: pytest-xdist
pytest-github-actions-annotate-failures
commands =
!cov: {env:PYTEST_COMMAND} {posargs} -m 'not slow'
all: {env:PYTEST_COMMAND} {posargs}
cov-all: {env:PYTEST_COMMAND} {posargs} --cov=plasmapy --cov-report=xml --cov-config={toxinidir}{/}setup.cfg --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
minimal: with minimal versions of dependencies
cov: with code coverage
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:build_docs]
changedir = {toxinidir}
extras = docs
setenv =
HOME = {envtmpdir}
commands = sphinx-build docs docs{/}_build{/}html -W -n --keep-going -b html {posargs}
[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}
# This env requires tox-conda.
[testenv:py38-conda]
basepython = python3.8
extras =
deps =
lmfit
pytest-cov
pytest-xdist
conda_deps =
astropy >= 4.3.1
h5py >= 3.0.0
matplotlib
mpmath
numpy >= 1.19.0
numpydoc
pillow
pytest >= 5.4.0
scipy >= 1.5.0
sphinx
sphinx_rtd_theme
# This env tests minimal versions of each dependency.
[testenv:py38-all-minimal]
basepython = python3.8
extras =
deps =
astropy == 4.3.1
cached-property == 1.5.2
ipywidgets == 7.6.5
h5py == 3.0.0
hypothesis
lmfit == 1.0.0
matplotlib == 3.3.0
mpmath == 1.2.1
numba
numpy == 1.19.0
pandas == 1.0.0
pillow
pytest == 5.4.0
pytest-cov
pytest-regressions
scipy == 1.5.0
tqdm == 4.41.0
voila == 0.2.15
xarray == 0.15.0
setenv =
PYTEST_COMMAND = pytest --pyargs plasmapy --durations=25
[testenv:linters]
deps =
dlint
flake8
flake8-absolute-import
flake8-implicit-str-concat
flake8-mutable
flake8-rst-docstrings
flake8-simplify
flake8-use-fstring
pydocstyle
pygments
commands =
flake8 --bug-report
flake8 {toxinidir}{/}plasmapy --count --show-source --statistics
[testenv:py38-minimal-pypi-import]
basepython = python3.8
extras =
deps =
commands = python -c 'import plasmapy'
[testenv:codespell]
deps =
codespell
commands_pre =
echo
echo "Codespell finds typos in source code. Rather than checking if each word"
echo "matches a dictionary entry, it looks for a set of common misspellings"
echo "in order to reduce the number of false positives."
echo
commands =
codespell .
commands_post =
echo
echo "After codespell has been installed locally (`pip install codespell`),"
echo "running the command `codespell -i 2 -w` will interactively go through"
echo "misspellings and suggest one or more replacements. Add any false"
echo "positives under ignore-words-list under [codespell] in setup.cfg."