[Git][debian-gis-team/xsar][master] 2 commits: New 0001-no-network.patch
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sun Nov 22 12:19:24 GMT 2026
Antonio Valentino pushed to branch master at Debian GIS Project / xsar
Commits:
56f53157 by Antonio Valentino at 2026-11-22T12:16:41+00:00
New 0001-no-network.patch
- - - - -
fa79fa46 by Antonio Valentino at 2026-11-22T12:18:27+00:00
Enable testing
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/0001-no-network.patch
- + debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -3,6 +3,10 @@ xsar (2026.11.19-1) unstable; urgency=medium
* New upstream release.
* debian/control:
- Update dependency versions.
+ * debian/patches:
+ - New 0001-no-network.patch.
+ * debian/rules:
+ - Enable testing.
-- Antonio Valentino <antonio.valentino at tiscali.it> Sun, 22 Nov 2026 11:51:40 +0000
=====================================
debian/patches/0001-no-network.patch
=====================================
@@ -0,0 +1,107 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 22 Nov 2026 12:14:21 +0000
+Subject: no-network
+
+Mark tests requiring access to the internet
+---
+ pyproject.toml | 3 +++
+ test/test_flip_coords.py | 2 ++
+ test/test_opening.py | 3 +++
+ test/test_resampled_read_rcm.py | 4 ++++
+ 4 files changed, 12 insertions(+)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 75cd226..e067716 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -95,3 +95,6 @@ branch = true
+ [tool.coverage.report]
+ show_missing = true
+ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]
++
++[tool.pytest.ini_options]
++markers = ["network"]
+diff --git a/test/test_flip_coords.py b/test/test_flip_coords.py
+index a73a2ee..47ddd3b 100644
+--- a/test/test_flip_coords.py
++++ b/test/test_flip_coords.py
+@@ -59,6 +59,7 @@ def rms_of_valid_pixels(pixels):
+ return np.sqrt(np.mean(valid**2)) if valid.size else 0
+
+
++ at pytest.mark.network
+ @pytest.mark.parametrize("case", list(PRODUCTS))
+ def test_cells_are_at_their_coordinates(case):
+ cls, name, pattern = PRODUCTS[case]
+@@ -101,6 +102,7 @@ def test_cells_are_at_their_coordinates(case):
+ )
+
+
++ at pytest.mark.network
+ @pytest.mark.parametrize("case", ["rcm_samples_flipped", "rcm_lines_flipped"])
+ def test_full_resolution_coordinates_unchanged(case):
+ """At full resolution, the flipped coordinates are still 0, 1, 2, ..."""
+diff --git a/test/test_opening.py b/test/test_opening.py
+index 5c01965..b95e1fd 100644
+--- a/test/test_opening.py
++++ b/test/test_opening.py
+@@ -7,6 +7,7 @@ import xsar
+ import xarray as xr
+
+
++ at pytest.mark.network
+ def test_open_dataset_sentinel1():
+ """
+ Test that open_dataset works with resolution='1000m' for Sentinel-1.
+@@ -39,6 +40,7 @@ def test_open_dataset_sentinel1():
+ ds.close()
+
+
++ at pytest.mark.network
+ def test_open_dataset_radarsat2():
+ """
+ Test that open_dataset works with resolution='1000m' for RadarSat-2.
+@@ -71,6 +73,7 @@ def test_open_dataset_radarsat2():
+ ds.close()
+
+
++ at pytest.mark.network
+ def test_open_dataset_rcm():
+ """
+ Test that open_dataset works with resolution='1000m' for RCM.
+diff --git a/test/test_resampled_read_rcm.py b/test/test_resampled_read_rcm.py
+index 75b3edb..4d35d52 100644
+--- a/test/test_resampled_read_rcm.py
++++ b/test/test_resampled_read_rcm.py
+@@ -51,6 +51,7 @@ def rms_of_valid_pixels(pixels):
+ return np.sqrt(np.mean(valid**2)) if valid.size else 0
+
+
++ at pytest.mark.network
+ def test_grid_at_1000m(at_1000m):
+ """19 127 x 18 042 pixels of 20 m at 1000 m: 382 x 360 whole cells of 50 x 50 pixels.
+
+@@ -71,6 +72,7 @@ def test_grid_at_1000m(at_1000m):
+ assert ds.valid_pixel_fraction.attrs["units"] == "1"
+
+
++ at pytest.mark.network
+ def test_four_cells_checked_by_hand(at_1000m):
+ """Four cells of the scene, with their values (rms of the valid pixels):
+
+@@ -96,6 +98,7 @@ def test_four_cells_checked_by_hand(at_1000m):
+ np.testing.assert_allclose(fraction[379, 226], 0.508, atol=1e-6)
+
+
++ at pytest.mark.network
+ def test_any_cell_is_the_rms_of_its_own_pixels(at_1000m, product):
+ """Same check on 20 cells straddling the swath border and 20 cells taken at random:
+ each cell is the rms of the non-zero pixels it covers, and valid_pixel_fraction
+@@ -127,6 +130,7 @@ def test_any_cell_is_the_rms_of_its_own_pixels(at_1000m, product):
+ )
+
+
++ at pytest.mark.network
+ def test_valid_pixel_fraction_is_in_the_xsar_dataset(rcm):
+ ds = rcm.dataset
+
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+0001-no-network.patch
=====================================
debian/rules
=====================================
@@ -4,6 +4,7 @@ include /usr/share/dpkg/pkg-info.mk
export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
export PYBUILD_NAME=xsar
+export PYBUILD_TEST_ARGS=-m "not network"
%:
dh $@ --buildsystem=pybuild
View it on GitLab: https://salsa.debian.org/debian-gis-team/xsar/-/compare/ad66f56e920b593e845659efa1fda87240e03bf3...fa79fa46470da42cf0be02b36775bc8828521a13
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/xsar/-/compare/ad66f56e920b593e845659efa1fda87240e03bf3...fa79fa46470da42cf0be02b36775bc8828521a13
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20261122/52ac54f6/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list