-
Notifications
You must be signed in to change notification settings - Fork 58
329 lines (324 loc) · 16 KB
/
pythonpackage.yml
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
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
# runs-on: macos-latest
strategy:
matrix:
#python-version: [3.5, 3.6, 3.7, 3.8]
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
#os: [ubuntu-latest]
#os: [windows-latest]
python-version: [3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Linux)
env:
MMS_AUTH_U: ${{ secrets.MMS_AUTH_U }}
MMS_AUTH_P: ${{ secrets.MMS_AUTH_P }}
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install basemap
pip install mth5
python -m pyspedas.projects.mms.tests.setup_tests
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies (Windows)
env:
MMS_AUTH_U: ${{ secrets.MMS_AUTH_U }}
MMS_AUTH_P: ${{ secrets.MMS_AUTH_P }}
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install basemap
pip install mth5
python -m pyspedas.projects.mms.tests.setup_tests
if: matrix.os == 'windows-latest'
- name: Install dependencies (macOS)
env:
MMS_AUTH_U: ${{ secrets.MMS_AUTH_U }}
MMS_AUTH_P: ${{ secrets.MMS_AUTH_P }}
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install spacepy # required for MMS qcotrans tests
pip install coveralls
pip install basemap
pip install mth5
python -m pyspedas.projects.mms.tests.setup_tests
if: matrix.os == 'macos-latest'
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --max-line-length=127 --exclude 'erg'
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --statistics --max-line-length=127
- name: Test with unittest
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/refactor_projects'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
VIRES_TOKEN: ${{ secrets.VIRES_AUTH }}
SPEDAS_DATA_DIR: data
ACE_DATA_DIR: ace_data/
BARREL_DATA_DIR: barrel_data/
CLUSTER_DATA_DIR: cluster_data/
DSC_DATA_DIR: dsc_data/
CSSWE_DATA_DIR: csswe_data/
EQUATORS_DATA_DIR: eqs_data/
FAST_DATA_DIR: fast_data/
GEOTAIL_DATA_DIR: geotail_data/
GOES_DATA_DIR: goes_data/
IMAGE_DATA_DIR: img_data/
MICA_DATA_DIR: mica_data/
MMS_DATA_DIR: mms_data/
OMNI_DATA_DIR: omni_data/
POES_DATA_DIR: poes_data/
POLAR_DATA_DIR: polar_data/
PSP_DATA_DIR: psp_data/
RBSP_DATA_DIR: rbsp_data/
SOLO_DATA_DIR: solo_data/
STEREO_DATA_DIR: stereo_data/
THM_DATA_DIR: themis_data/
TWINS_DATA_DIR: twins_data/
ULY_DATA_DIR: uly_data/
WIND_DATA_DIR: wind_data/
LANL_DATA_DIR: lanl_data/
CNOFS_DATA_DIR: cnofs_data/
ST5_DATA_DIR: st5_data/
PYTPLOT_LOGGING_LEVEL: error
run: |
echo "========================================================="
# Show the free disk space on this filesystem
echo "Disk space prior to starting tests:"
df -h .
# Show the IP address the test suite is running from (useful for troubleshooting data server access issues)
echo "========================================================="
echo IP address for this test:
coverage run -a -m pyspedas.utilities.tests.test_find_ip_address
#echo Starting maven tests at `date`
#coverage run -a -m pyspedas.projects.maven.tests.tests
echo Starting ace tests at `date`
coverage run -a -m pyspedas.projects.ace.tests.tests
echo Starting erg tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.tests
echo Starting erg cotrans tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.cotrans_tests
echo Starting erg ground data tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.ground_tests
echo Starting erg mepe particle tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.mepe_part_products
echo Starting erg mepi particle tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.mepi_part_products
echo Starting erg lepe particle tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.lepe_part_products
echo Starting erg lepi particle tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.lepi_part_products
echo Starting erg xep particle tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.xep_part_products
echo Starting erg hep particle tests at `date`
coverage run -a -m pyspedas.projects.erg.tests.hep_part_products
echo "========================================================="
# Show the free disk space on this filesystem
echo "Disk space after ERG tests:"
df -h .
# Clean up files downloaded so far
/bin/rm -rf data/*
echo "Disk space after cleanup:"
df -h .
echo "========================================================="
echo Starting VIRES client tests at `date`
coverage run -a -m pyspedas.vires.tests.tests
echo Starting secs tests at `date`
coverage run -a -m pyspedas.projects.secs.tests.tests
echo Starting MTH5 import test at `date`
coverage run -a -m pyspedas.mth5.tests.test_mth5_import
echo Starting MTH5 load_fdsn test at `date`
coverage run -a -m pyspedas.mth5.tests.test_load_fdsn
echo Starting cluster tests at `date`
coverage run -a -m pyspedas.projects.cluster.tests.tests
#echo Starting akebono tests at `date`
#coverage run -a -m pyspedas.projects.akebono.tests.tests
echo Starting CDAWeb tests at `date`
coverage run -a -m pyspedas.cdagui.tests.tests
echo Starting themis tplot_time tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_tplot_time
echo Starting barrel tests at `date`
coverage run -a -m pyspedas.projects.barrel.tests.tests
echo Starting elfin epd_l1 tests at `date`
coverage run -a -m pyspedas.projects.elfin.tests.test_epd_l1
echo Starting elfin epd_l2 tests at `date`
coverage run -a -m pyspedas.projects.elfin.tests.test_epd_l2
echo Starting elfin state tests at `date`
coverage run -a -m pyspedas.projects.elfin.tests.test_state
echo Starting elfin tests at `date`
coverage run -a -m pyspedas.projects.elfin.tests.tests
echo Starting elfin epd calibration tests at `date`
coverage run -a -m pyspedas.projects.elfin.tests.test_epd_calibration
echo Starting soho tests at `date`
coverage run -a -m pyspedas.projects.soho.tests.tests
echo Starting de2 tests at `date`
coverage run -a -m pyspedas.projects.de2.tests.tests
echo Starting st5 tests at `date`
coverage run -a -m pyspedas.projects.st5.tests.tests
echo Starting lanl tests at `date`
coverage run -a -m pyspedas.projects.lanl.tests.tests
echo Starting cotrans quaternion tests at `date`
coverage run -a -m pyspedas.cotrans.tests.quaternions
echo Starting cnofs tests at `date`
coverage run -a -m pyspedas.projects.cnofs.tests.tests
echo Starting kompsat tests at `date`
coverage run -a -m pyspedas.projects.kompsat.tests.tests
echo Starting hapi tests at `date`
coverage run -a -m pyspedas.hapi.tests.tests
echo Starting noaa tests at `date`
coverage run -a -m pyspedas.projects.noaa.tests.tests
echo Starting particles tests at `date`
coverage run -a -m pyspedas.particles.tests.tests
echo Starting mms cotrans tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.cotrans
echo Starting mms events tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.events
echo Starting mms orbit_plots tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.orbit_plots
echo Starting mms overview_plots tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.overview_plots
echo Starting mms neutral sheet tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.neutral_sheet
echo Starting mms ql_lib_sitl tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.ql_l1b_sitl_tests
echo Starting mms_part_getspec tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.mms_part_getspec
echo Starting mms load routine tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.load_routine_tests
echo Starting mms feeps tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.feeps
echo Starting mms eis tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.eis
echo Starting mms fpi tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.fpi_tests
echo Starting mms file_filter tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.file_filter
echo Starting mms data_rate_segments tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.data_rate_segments
echo Starting mms curlometer tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.curlometer
echo Starting mms wavpol tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.wavpol
echo Starting mms slice2d tests at `date`
coverage run -a -m pyspedas.projects.mms.tests.slice2d
echo "========================================================="
# Show the free disk space on this filesystem
echo "Disk space after MMS tests:"
df -h .
# Clean up MMS data
/bin/rm -rf mms_data/*
echo "Disk space after MMS cleanup:"
df -h .
echo "========================================================="
echo Starting dscovr tests at `date`
coverage run -a -m pyspedas.projects.dscovr.tests.tests
echo Starting utilities download tests at `date`
coverage run -a -m pyspedas.utilities.tests.download_tests
echo Starting utilities misc tests at `date`
coverage run -a -m pyspedas.utilities.tests.misc_tests
echo Starting tplot wildcard tests at `date`
coverage run -a -m pyspedas.utilities.tests.tplot_wildcard_tests
echo Starting plotting tests at `date`
coverage run -a -m pyspedas.utilities.tests.plot_tests
echo Starting utilities time_tests tests at `date`
coverage run -a -m pyspedas.utilities.tests.time_tests
echo Starting utilities libs_tests tests at `date`
coverage run -a -m pyspedas.utilities.tests.libs_tests
echo Starting cotrans tests at `date`
coverage run -a -m pyspedas.cotrans.tests.cotrans
echo Starting cotrans quaternion tests at `date`
coverage run -a -m pyspedas.cotrans.tests.quaternions
echo Starting cotrans minvar tests at `date`
coverage run -a -m pyspedas.cotrans.tests.test_minvar
echo Starting csswe tests at `date`
coverage run -a -m pyspedas.projects.csswe.tests.tests
echo Starting equator_s tests at `date`
coverage run -a -m pyspedas.projects.equator_s.tests.tests
echo Starting image tests at `date`
coverage run -a -m pyspedas.projects.image.tests.tests
echo Starting psp tests at `date`
coverage run -a -m pyspedas.projects.psp.tests.tests
echo Starting rbsp tests at `date`
coverage run -a -m pyspedas.projects.rbsp.tests.tests
echo Starting stereo tests at `date`
coverage run -a -m pyspedas.projects.stereo.tests.tests
echo Starting twins tests at `date`
coverage run -a -m pyspedas.projects.twins.tests.tests
echo Starting wind tests at `date`from pyspedas.poes.load import load
coverage run -a -m pyspedas.projects.wind.tests.tests
echo Starting poes tests at `date`
coverage run -a -m pyspedas.projects.poes.tests.tests
echo Starting polar tests at `date`
coverage run -a -m pyspedas.projects.polar.tests.tests
echo Starting geopack tests at `date`
coverage run -a -m pyspedas.geopack.tests.tests
echo Starting geopack-IDL validation tests at `date`
coverage run -a -m pyspedas.geopack.tests.geopack_idl_validation_tests
echo Starting geotail tests at `date`
coverage run -a -m pyspedas.projects.geotail.tests.tests
echo Starting analysis tests at `date`
coverage run -a -m pyspedas.analysis.tests.tests
echo Starting analysis wavpol tests at `date`
coverage run -a -m pyspedas.analysis.tests.test_twavpol
echo Starting analysis magnetic nulls tests at `date`
coverage run -a -m pyspedas.analysis.tests.test_magnetic_nulls
echo Starting fast tests at `date`
coverage run -a -m pyspedas.projects.fast.tests.tests
echo Starting omni tests at `date`
coverage run -a -m pyspedas.projects.omni.tests.tests
echo Starting themis tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests
echo Starting goes tests at `date`
coverage run -a -m pyspedas.projects.goes.tests.tests
echo Starting mica tests at `date`
coverage run -a -m pyspedas.projects.mica.tests.tests
echo Starting ulysses tests at `date`
coverage run -a -m pyspedas.projects.ulysses.tests.tests
echo Starting solo tests at `date`
coverage run -a -m pyspedas.projects.solo.tests.tests
echo Starting kyoto tests at `date`
coverage run -a -m pyspedas.projects.kyoto.tests.tests
echo Starting swarm tests at `date`
coverage run -a -m pyspedas.projects.swarm.tests.tests
echo Starting themis_check_args tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_themis_check_args
echo Starting themis autoload support tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.autoload_support_tests
echo Starting themis cal_fit tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_cal_fit
echo Starting themis dsl_cotrans tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_dsl_cotrans
echo Starting themis lunar_cotrans tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_lunar_cotrans
echo Starting themis spinmodel tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_spinmodel
echo Starting themis state tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_state
echo Starting themis scpot2dens tests at `date`
coverage run -a -m pyspedas.projects.themis.tests.tests_scpot2dens
echo "========================================================="
# Show the free disk space on this filesystem
echo "Disk space after all tests:"
df -h .
echo "========================================================="
echo Done with tests at `date`
coveralls