Bas Couwenberg pushed to branch master at Debian GIS Project / rasterio
Commits: 11975c10 by Bas Couwenberg at 2023-11-09T18:27:19+01:00 Replace gdal-3.8.patch with upstream changes. - - - - - 2 changed files: - debian/changelog - debian/patches/gdal-3.8.patch Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,10 @@ +rasterio (1.3.9-4) UNRELEASED; urgency=medium + + * Team upload. + * Replace gdal-3.8.patch with upstream changes. + + -- Bas Couwenberg <[email protected]> Thu, 09 Nov 2023 18:27:05 +0100 + rasterio (1.3.9-3) unstable; urgency=medium * Team upload. ===================================== debian/patches/gdal-3.8.patch ===================================== @@ -1,14 +1,71 @@ -Description: Fix FTBFS with GDAL 3.8.0. -Author: Bas Couwenberg <[email protected]> +Description: Adjust several tests to small differences in output between GDAL 3.7 and 3.8. +Author: Sean Gillies <[email protected]> +Origin: https://github.com/rasterio/rasterio/pull/2959 Bug: https://github.com/rasterio/rasterio/issues/2965 --- a/tests/test_read_resample.py +++ b/tests/test_read_resample.py -@@ -94,6 +94,7 @@ def test_resampling_alg_error(): - src.read(1, out_shape=(1, 10, 10), resampling=Resampling.max) +@@ -103,4 +103,4 @@ def test_resampling_rms(): + expected = np.array([ + [1.35266399, 0.95388681], + [0.29308701, 1.54074657]], dtype=np.float32) +- assert (rms == expected).all() # all True. ++ assert np.allclose(rms, expected) +--- a/tests/test_rio_merge.py ++++ b/tests/test_rio_merge.py +@@ -1,6 +1,6 @@ + """Unittests for $ rio merge""" +- ++from io import StringIO + import os + import sys + import textwrap +@@ -521,15 +521,17 @@ def test_merge_precision(tmpdir, precisi + xllcorner 0.000000000000 + yllcorner 0.000000000000 + cellsize 1.000000000000 +- 1 2 3 4 1 2 3 4 +- 3 4 5 6 3 4 5 6 +- 4 5 6 8 4 5 6 8 +- 7 9 5 4 7 9 5 4 +- 1 2 3 4 1 2 3 4 +- 3 4 5 6 3 4 5 6 +- 4 5 6 8 4 5 6 8 +- 7 9 5 4 7 9 5 4 +- """ ++ 1 2 3 4 1 2 3 4 ++ 3 4 5 6 3 4 5 6 ++ 4 5 6 8 4 5 6 8 ++ 7 9 5 4 7 9 5 4 ++ 1 2 3 4 1 2 3 4 ++ 3 4 5 6 3 4 5 6 ++ 4 5 6 8 4 5 6 8 ++ 7 9 5 4 7 9 5 4 ++ """ ++ ++ expected_file = StringIO(textwrap.dedent(expected)) [email protected](strict=False, reason="Fails with GDAL 3.8.0") - @requires_gdal33 - def test_resampling_rms(): - """Test Resampling.rms method""" + template = """\ + ncols 4 +@@ -556,7 +558,19 @@ def test_merge_precision(tmpdir, precisi + runner = CliRunner() + result = runner.invoke(main_group, ["merge", "-f", "AAIGrid"] + precision + inputs + [outputname]) + assert result.exit_code == 0 +- assert open(outputname).read() == textwrap.dedent(expected) ++ ++ # The arrangement of whitespace in the data part of the file ++ # changed between 3.7 and 3.8 to better conform. We will compare ++ # in a way that is more independent. ++ with open(outputname) as out_file: ++ # Compare header lines. ++ for i in range(5): ++ assert out_file.readline().strip() == expected_file.readline().strip() ++ ++ # Compare raster data as single strings. ++ out_data = " ".join(line.strip() for line in out_file.readlines()) ++ expected_data = " ".join(line.strip() for line in expected_file.readlines()) ++ assert out_data == expected_data + + + @fixture(scope='function') View it on GitLab: https://salsa.debian.org/debian-gis-team/rasterio/-/commit/11975c1016b69ecb31fda1ebedffb91239a4c66a -- View it on GitLab: https://salsa.debian.org/debian-gis-team/rasterio/-/commit/11975c1016b69ecb31fda1ebedffb91239a4c66a You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ Pkg-grass-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel
