diff --git a/tests/conftest.py b/tests/conftest.py index ae3e8c69..55ad79fb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,7 +11,7 @@ # Define a URL to the xdem-data repository's test data _TESTDATA_REPO_URL = "https://github.com/vschaffn/xdem-data/tarball/2-richdem_gdal" -_COMMIT_HASH = "ca9d7e34294cf57c00cea4adbf4ee634a63e20d7" +_COMMIT_HASH = "31a7159c982cec4b352f0de82bd4e0be61db3afe" def download_test_data(overwrite: bool = False) -> None: diff --git a/tests/test_terrain.py b/tests/test_terrain.py index c9185c7c..52ce4088 100644 --- a/tests/test_terrain.py +++ b/tests/test_terrain.py @@ -143,18 +143,6 @@ def test_attribute_functions_against_richdem(self, attribute: str, get_test_data "planform_curvature": lambda dem: xdem.terrain.planform_curvature(dem.data, resolution=dem.res), } - # Functions for RichDEM wrapper methods - # functions_richdem = { - # "slope_Horn": lambda dem: get_terrain_attribute_richdem(dem, attribute="slope", degrees=True), - # "aspect_Horn": lambda dem: get_terrain_attribute_richdem(dem, attribute="aspect", degrees=True), - # "hillshade_Horn": lambda dem: get_terrain_attribute_richdem(dem, attribute="hillshade"), - # "curvature": lambda dem: get_terrain_attribute_richdem(dem, attribute="curvature"), - # "profile_curvature": lambda dem: get_terrain_attribute_richdem(dem, attribute="profile_curvature"), - # "planform_curvature": lambda dem: get_terrain_attribute_richdem( - # dem, attribute="planform_curvature", degrees=True - # ), - # } - # Copy the DEM to ensure that the inter-test state is unchanged, and because the mask will be modified. dem = self.dem.copy() @@ -162,7 +150,6 @@ def test_attribute_functions_against_richdem(self, attribute: str, get_test_data attr_xdem = gu.raster.get_array_and_mask(functions_xdem[attribute](dem))[0].squeeze() attr_richdem_rst = gu.Raster(get_test_data_path(os.path.join("richdem", f"{attribute}.tif")), load_data=True) attr_richdem = gu.raster.get_array_and_mask(attr_richdem_rst)[0].squeeze() - # attr_richdem = gu.raster.get_array_and_mask(functions_richdem[attribute](dem))[0].squeeze() # We compute the difference and keep only valid values diff = attr_xdem - attr_richdem