[Git][debian-gis-team/rasterio][master] Replace gdal-3.8.patch with upstream changes.

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Thu Nov 9 17:37:21 GMT 2023



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 <sebastic at debian.org>  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 <sebastic at debian.org>
+Description: Adjust several tests to small differences in output between GDAL 3.7 and 3.8.
+Author: Sean Gillies <seangillies at Seans-MacBook-Air.local>
+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))
  
-+ at pytest.mark.xfail(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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20231109/4131a375/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list