File tree 1 file changed +18
-7
lines changed
1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change 7
7
import tempfile
8
8
import unittest
9
9
10
+ # TODO remove in stable
11
+ import h5py
12
+ import h5netcdf
13
+
10
14
import pyfive
11
15
12
16
from netCDF4 import Dataset
13
17
14
- from activestorage .active import Active
18
+ from activestorage .active import Active , load_from_s3
15
19
from activestorage .config import *
16
20
from activestorage import dummy_data as dd
17
21
@@ -194,17 +198,24 @@ def test_validmax(tmp_path):
194
198
assert unmasked_numpy_mean != masked_numpy_mean
195
199
print ("Numpy masked result (mean)" , masked_numpy_mean )
196
200
201
+ # load files via external protocols
202
+ y = Dataset (testfile )
203
+ z = h5py .File (testfile )
204
+ a = h5netcdf .File (testfile )
205
+
197
206
# write file to storage
198
207
testfile = utils .write_to_storage (testfile )
199
- x = pyfive .File (testfile )
200
- y = Dataset (testfile )
208
+
209
+ # load file via our protocols
210
+ if USE_S3 :
211
+ x = load_from_s3 (testfile )
212
+ else :
213
+ x = pyfive .File (testfile )
214
+
215
+ # print for Bryan
201
216
print ('bnl' ,y ['data' ].getncattr ('valid_max' ))
202
217
print ('bnl' ,x ['data' ].attrs .get ('valid_max' ))
203
- import h5py
204
- z = h5py .File (testfile )
205
218
print ('bnl' ,z ['data' ].attrs .get ('valid_max' ))
206
- import h5netcdf
207
- a = h5netcdf .File (testfile )
208
219
print ('bnl' ,a ['data' ].attrs .get ('valid_max' ))
209
220
210
221
You can’t perform that action at this time.
0 commit comments