In https://github.com/EcoExtreML/zampy/tree/main/tests/test_data/fapar-lai/ingest/fapar-lai, we save some sample nc files for the test of load function. This can be further optimized by using the test data in download folder and unzip it on the fly when running that test, similar to
|
def test_load(self, dummy_dir): |
|
"""Test load function.""" |
|
times = TimeBounds(np.datetime64("1996-01-01"), np.datetime64("1996-12-31")) |
|
bbox = SpatialBounds(39, -107, 37, -109) |
|
variable = ["land_cover"] |
|
|
|
_, land_cover_dataset = self.ingest_dummy_data(dummy_dir) |
|
|
|
ds = land_cover_dataset.load( |
|
ingest_dir=Path(dummy_dir), |
|
time_bounds=times, |
|
spatial_bounds=bbox, |
|
variable_names=variable, |
|
resolution=1.0, |
|
regrid_method="most_common", |
|
) |
This could save about 15MB for this repo.
In
https://github.com/EcoExtreML/zampy/tree/main/tests/test_data/fapar-lai/ingest/fapar-lai, we save some sample nc files for the test of load function. This can be further optimized by using the test data in download folder and unzip it on the fly when running that test, similar tozampy/tests/test_datasets/test_land_cover.py
Lines 95 to 110 in 9d24eed
This could save about 15MB for this repo.