forked from PlasmaPy/PlasmaPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
321 lines (308 loc) · 8.26 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
[tox]
envlist = clean,py39,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 --showlocals -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}{/}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
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}
echo "Troubleshooting guide: https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#troubleshooting"
[testenv:build_docs_pins]
changedir = {toxinidir}
setenv =
HOME = {envtmpdir}
commands =
sphinx-build docs docs{/}_build{/}html -W -n --keep-going -b html {posargs}
echo "Troubleshooting guide: https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#troubleshooting"
deps = -r{toxinidir}/requirements.txt
[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: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:py310-pins]
basepython = python3.10
deps = -r{toxinidir}/requirements.txt
# This env requires tox-conda.
[testenv:py39-conda]
basepython = python3.9
extras =
deps =
lmfit
pytest-cov
pytest-xdist
conda_deps =
astropy >= 4.3.1
h5py >= 3.0.0
matplotlib
mpmath
numpy >= 1.20.0
numpydoc
pillow
pytest >= 5.4.0
scipy >= 1.5.0
sphinx
sphinx_rtd_theme
# This env tests minimal versions of each dependency.
[testenv:py39-all-minimal]
basepython = python3.9
extras = tests
deps =
astropy == 5.0.1
h5py == 3.1.0
ipywidgets == 7.6.5
hypothesis
lmfit == 1.0.0
matplotlib == 3.3.0
mpmath == 1.2.1
numba
numpy == 1.21.0
pandas == 1.2.0
pillow
pytest == 6.0.0
pytest-cov
pytest-regressions
requests == 2.27.1
scipy == 1.6.0
tqdm == 4.41.0
voila == 0.3.0
xarray == 0.17.0
setenv =
PYTEST_COMMAND = pytest --pyargs plasmapy --durations=25 --showlocals
[testenv:linters]
deps =
cffconvert
flake8
flake8-absolute-import
flake8-builtins
flake8-comments
flake8-implicit-str-concat
flake8-mutable
flake8-rst-docstrings
flake8-simplify
flake8-use-fstring
flake8-use-pathlib
pydocstyle
pygments
tryceratops
commands =
flake8 --bug-report
flake8 {toxinidir}{/}plasmapy --count --show-source --statistics
cffconvert --validate
[testenv:py39-minimal-pypi-import]
basepython = python3.9
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 pyproject.toml."
[flake8]
convention = numpy
max-doc-length = 88
# Checks marked as TODO should be eventually enabled,
# but are failing right now. These are *great*
# first contributions. ;)
# Checks not marked by TODO *maybe* should be
# eventually enabled ― ask!
extend-ignore =
D105,
D107,
# Ignoring D202 allows blank lines to be put on either side of code "paragraphs" at the beginning of a function.
D202,
# D205 and D400 are ignored to allow the "one-liner" to exceed one
# line, which is sometimes necessary for even concise descriptions of plasma
# physics functions and classes.
D205,
# D302 is unnecessary as we are using Python 3.6+.
D302,
# D205 and D400 are ignored to allow the "one-liner" to exceed one
# line, which is sometimes necessary for even concise descriptions of plasma
# physics functions and classes.
D400,
# D403: First word of the first line should be properly capitalized ('Latex', not 'LaTeX') # Dominik: good job, pydocstyle /s
D403,
# E203 something something whitespace? TODO check again
E203,
E501,
# E731 do not assign a lambda, use a def - Dominik: disagreed, lambdas have uses
E731,
F401,
F405,
# W605 invalid escape sequence,
W605,
RST210,
RST213,
# RST305 so that ReST substitutions in a different file can be used
RST305,
RST306
# TC003 to allow long messages to be specified outside the exception class
TC003
exclude =
extern,
sphinx,
*test*,
*parsetab.py,
conftest.py,
docs/conf.py,
.jupyter
# Use rst-roles and rst-directives to list roles and directives from
# Sphinx and its extensions so that they don't get flagged when using
# flake8-rst-docstrings.
rst-roles =
abbr
any
attr
cite
cite:ct
cite:cts
cite:p
cite:ps
cite:t
cite:ts
class
command
commit
confval
data
dfn
doc
download
envvar
eq
event
exc
file
func
guilabel
issue
kbd
keyword
makevar
manpage
menuselection
meth
mod
numref
option
orcid
pep
pr
program
ref
regexp
rst:dir
samp
term
token
user
wikipedia
rst-directives =
codeauthor
confval
deprecated
event
highlight
hlist
index
literalinclude
nbgallery
only
rst:directive
samp
sectionauthor
seealso
tabularcolumns
todo
versionadded
versionchanged
enable-extensions =
# Look for strings that have {} in them but aren't f-strings.
# If there is a false positive from this in a file, put that in
# per-file-ignores.
FS003
W505
per-file-ignores =
plasmapy/__init__.py:FS003
plasmapy/analysis/fit_functions.py:RST499
# The nullpoint.py ignore is temporary pending #1554
plasmapy/analysis/nullpoint.py:SIM102,SIM103
plasmapy/diagnostics/charged_particle_radiography/synthetic_radiography.py:FS003,W505
plasmapy/diagnostics/charged_particle_radiography/detector_stacks.py:FS003,W505
plasmapy/formulary/__init__.py:E402,F403
plasmapy/formulary/collisions/__init__.py:E402,F403
plasmapy/formulary/collisions/lengths.py:SIM114
# The decorators.py ignore is temporary pending #1057
plasmapy/particles/decorators.py:SIM102
plasmapy/particles/ionization_state_collection.py:SIM102
# Files with long lines in docstrings
plasmapy/analysis/swept_langmuir/ion_saturation_current.py:W505
plasmapy/formulary/collisions/frequencies.py:W505
plasmapy/formulary/relativity.py:W505
plasmapy/simulation/particle_integrators.py:W505