-
Notifications
You must be signed in to change notification settings - Fork 58
/
tox.ini
349 lines (328 loc) · 9.69 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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
[tox]
env_list =
compatibility
coverage
py{39,310,311,312,313}{,-compatibility,-coverage,-jsonschema}{,-devdeps}{,-parallel}{,-pytestdev}
asdf{-standard,-transform-schemas,-unit-schemas,-wcs-schemas,-coordinates-schemas,-astropy,-zarr,-compression}
astrocut
gwcs
jwst
stdatamodels
stpipe
roman_datamodels
weldx
sunpy
dkist
[testenv]
set_env =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
deps =
compatibility: virtualenv
coverage: coverage
devdeps: -rrequirements-dev.txt
numpydev: cython
oldestdeps: minimum_dependencies
parallel: pytest-xdist
pytestdev: git+https://github.com/pytest-dev/pytest
extras = all,tests
# astropy will complain if the home directory is missing
pass_env = HOME
package = editable
commands_pre =
python -m pip install --upgrade pip
# Generate `requiremments-min.txt`
oldestdeps: minimum_dependencies asdf --filename {env_tmp_dir}/requirements-min.txt
# Force install everything from `requirements-min.txt`
oldestdeps: pip install -r {env_tmp_dir}/requirements-min.txt
pip freeze
# coverage run must be used because the pytest-asdf plugin will interfere
# with proper coverage measurement due to the order pytest loads its
# entry points.
commands =
coverage: coverage run --source=asdf --rcfile={tox_root}/pyproject.toml -m \
pytest \
compatibility: compatibility_tests/ \
--remote-data \
--durations=10 \
jsonschema: --jsonschema \
parallel: --numprocesses auto \
# the OpenAstronomy workflow appends `--cov-report` in `{posargs}`, which `coverage` doesn't recognize
!coverage: {posargs}
coverage:
coverage: coverage xml -o {tox_root}/coverage.xml
coverage: coverage report
[testenv:asdf-standard]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/asdf-format/asdf-standard.git
pip install -e asdf-standard[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-standard
[testenv:asdf-compression]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/asdf-format/asdf-compression.git
pip install -e asdf-compression[tests,all]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-compression
[testenv:asdf-zarr]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/asdf-format/asdf-zarr.git
pip install -e asdf-zarr[tests]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-zarr
[testenv:asdf-transform-schemas]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/asdf-format/asdf-transform-schemas.git
pip install -e asdf-transform-schemas[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-transform-schemas
[testenv:asdf-wcs-schemas]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/asdf-format/asdf-wcs-schemas.git
pip install -e asdf-wcs-schemas[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-wcs-schemas
[testenv:asdf-coordinates-schemas]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/asdf-format/asdf-coordinates-schemas.git
pip install -e asdf-coordinates-schemas[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-coordinates-schemas
[testenv:asdf-astropy]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/astropy/asdf-astropy.git
pip install -e asdf-astropy[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest asdf-astropy
[testenv:specutils]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/astropy/specutils.git
pip install -e specutils[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest specutils
[testenv:astrocut]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/spacetelescope/astrocut.git
pip install -e astrocut[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest astrocut/astrocut/tests/test_asdf_cut.py
[testenv:gwcs]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/spacetelescope/gwcs.git
pip install -e gwcs[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest gwcs
[testenv:jwst]
deps=
pytest-xdist
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
set_env =
CRDS_SERVER_URL = https://jwst-crds.stsci.edu
CRDS_PATH = /tmp/crds_cache
CRDS_CLIENT_RETRY_COUNT = 3
CRDS_CLIENT_RETRY_DELAY_SECONDS = 20
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/spacetelescope/jwst.git
pip install -e jwst[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest --numprocesses auto jwst
[testenv:stdatamodels]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
set_env =
CRDS_SERVER_URL = https://jwst-crds.stsci.edu
CRDS_PATH = /tmp/crds_cache
CRDS_CLIENT_RETRY_COUNT = 3
CRDS_CLIENT_RETRY_DELAY_SECONDS = 20
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/spacetelescope/stdatamodels.git
pip install -e stdatamodels[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest stdatamodels
[testenv:stpipe]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/spacetelescope/stpipe.git
pip install -e stpipe[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest stpipe/tests
[testenv:roman_datamodels]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/spacetelescope/roman_datamodels.git
pip install -e roman_datamodels[test]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest roman_datamodels/tests
[testenv:weldx]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/BAMWelDX/weldx.git
pip install -e weldx[test,media]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest weldx/weldx/tests/asdf_tests weldx/weldx/schemas --asdf-tests
[testenv:sunpy]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/sunpy/sunpy.git
pip install -e sunpy[tests,all]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest sunpy/sunpy/io
[testenv:dkist]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/DKISTDC/dkist.git
pip install -e dkist[tests]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
# the AsdfManifestURIMismatchWarning filter can be removed when a new sunpy
# is released which contains the fixed manifests:
# https://github.com/sunpy/sunpy/pull/7432
pytest dkist --benchmark-skip \
-W "ignore::asdf.exceptions.AsdfManifestURIMismatchWarning"
[testenv:abacusutils]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'asdf @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/abacusorg/abacusutils.git
pip install -vU setuptools wheel scipy Cython 'numpy<2' # for classy and corrfunc
pip install --no-build-isolation classy corrfunc
pip install -e abacusutils[test]
pip install -r {env_tmp_dir}/requirements.txt
# make an empty pytest.ini to prevent pytest from crawling up
# one directory and finding the pytest configuration for the asdf
# repo clone
bash -c "echo '' > pytest.ini"
pip freeze
commands =
# only running a subset of tests since only a portion of abacusutils
# relies on asdf
pytest abacusutils/tests/test_data.py