diff --git a/tests/data/udfs/raster_collections_ndvi.py b/tests/data/udfs/raster_collections_ndvi.py index d463753..4dc8a0b 100644 --- a/tests/data/udfs/raster_collections_ndvi.py +++ b/tests/data/udfs/raster_collections_ndvi.py @@ -10,7 +10,4 @@ def apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube: nir = array.sel(bands="TOC-B08_10M") ndvi = (nir - red) / (nir + red) - import os - statinfo = os.stat("/data/users/Public") - print(statinfo) return XarrayDataCube(ndvi) diff --git a/tests/test_integration.py b/tests/test_integration.py index f6ef2a5..aa93b8f 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -272,15 +272,13 @@ def test_histogram_timeseries(auth_connection): "udfs/raster_collections_ndvi.py", ]) def test_ndvi_udf_reduce_bands_udf(auth_connection, tmp_path, udf_file): - udf_code = read_data(udf_file) - cube = ( auth_connection.load_collection('TERRASCOPE_S2_TOC_V2',bands=['TOC-B04_10M','TOC-B08_10M']) .filter_temporal(start_date="2020-11-05", end_date="2020-11-05") .filter_bbox(west=761104, east=763281, south=6543830, north=6544655, crs="EPSG:3857") ) # cube.download(tmp_path / "cube.tiff", format="GTIFF") - res = cube.reduce_bands_udf(udf_code) + res = cube.reduce_bands(reducer=openeo.UDF.from_file(get_path(udf_file))) out_file = tmp_path / "ndvi-udf.tiff" res.download(out_file, format="GTIFF") @@ -978,6 +976,7 @@ def test_create_wtms_service(auth_connection): assert "