[Git][debian-gis-team/mapraster][master] 3 commits: Improve documentation fix

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sun Jan 11 02:04:42 GMT 2026



Antonio Valentino pushed to branch master at Debian GIS Project / mapraster


Commits:
17117193 by Antonio Valentino at 2026-01-11T01:16:24+00:00
Improve documentation fix

- - - - -
e4d2b414 by Antonio Valentino at 2026-01-11T02:01:15+00:00
New 0002-Fix-FutureWarning.patch

- - - - -
df3ad333 by Antonio Valentino at 2026-01-11T02:01:15+00:00
Set distribution to unstable

- - - - -


6 changed files:

- debian/changelog
- + debian/fixdocs.py
- + debian/patches/0001-No-legend-IDs.patch
- + debian/patches/0002-Fix-FutureWarning.patch
- + debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -2,4 +2,4 @@ mapraster (2026.01.06-1) unstable; urgency=low
 
   * Initial release (Closes: #1124974).
 
- -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 10 Jan 2026 16:59:07 +0000
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Sun, 11 Jan 2026 01:17:03 +0000


=====================================
debian/fixdocs.py
=====================================
@@ -0,0 +1,25 @@
+#!/bin/env python3
+
+import re
+import sys
+import pathlib
+import argparse
+
+parser = argparse.ArgumentParser()
+parser.add_argument("infile", type=pathlib.Path)
+parser.add_argument("outfile", type=pathlib.Path, nargs="?")
+
+args = parser.parse_args()
+
+infile = args.infile
+outfile = args.outfile if args.outfile is not None else infile
+
+data = infile.read_text()
+new_data = re.sub(
+    r'<div class=\"highlight\"><pre>\s+mkdir -p failed(.*\s){2}</pre></div>',
+    '',
+    data,
+    count=1,
+    flags=re.M,
+)
+outfile.write_text(new_data)


=====================================
debian/patches/0001-No-legend-IDs.patch
=====================================
@@ -0,0 +1,44 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 11 Jan 2026 01:15:22 +0000
+Subject: No legend IDs
+
+Forwarded: not-needed
+---
+ docs/examples/how_to_use.ipynb | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/docs/examples/how_to_use.ipynb b/docs/examples/how_to_use.ipynb
+index f17a483..8ce1c31 100644
+--- a/docs/examples/how_to_use.ipynb
++++ b/docs/examples/how_to_use.ipynb
+@@ -167,9 +167,8 @@
+    "source": [
+     "plt.pcolormesh(dataset.longitude, dataset.latitude, np.sqrt(dataset.U10**2+dataset.V10**2))\n",
+     "#plot footprint\n",
+-    "plt.plot(xs, ys, color='red', linewidth=2, label =  'footprint'\n",
+-    "         )\n",
+-    "plt.legend()    "
++    "plt.plot(xs, ys, color='red', linewidth=2, label =  'footprint')\n",
++    "plt.legend();"
+    ]
+   },
+   {
+@@ -276,7 +275,7 @@
+     "plt.plot(xs, ys, color='red', linewidth=2, label =  'footprint')\n",
+     "plt.title(\"Mapped wind speed (m/s)\") \n",
+     "plt.colorbar(label='m/s')\n",
+-    "plt.legend(loc = 'upper right')\n"
++    "plt.legend(loc='upper right');\n"
+    ]
+   },
+   {
+@@ -325,8 +324,7 @@
+     "plt.plot(xs, ys, color='red', linewidth=2, label =  'footprint')\n",
+     "plt.title(\"Mapped wind speed (m/s)\") \n",
+     "plt.colorbar(label='m/s')\n",
+-    "plt.legend(loc = 'upper right')\n",
+-    "\n"
++    "plt.legend(loc='upper right');\n"
+    ]
+   }
+  ],


=====================================
debian/patches/0002-Fix-FutureWarning.patch
=====================================
@@ -0,0 +1,22 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 11 Jan 2026 01:33:31 +0000
+Subject: Fix FutureWarning
+
+Forwarded: https://github.com/umr-lops/mapraster/pull/40
+---
+ mapraster/main.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mapraster/main.py b/mapraster/main.py
+index 87f95cf..f2e9f5e 100644
+--- a/mapraster/main.py
++++ b/mapraster/main.py
+@@ -135,7 +135,7 @@ def map_raster(
+         # final interpolation on image grid
+         mapped.append(upscaled.interp(x=target_lon, y=target_lat).drop_vars(("x", "y")))
+ 
+-    mapped_ds = xr.merge(mapped)
++    mapped_ds = xr.merge(mapped, compat="no_conflicts")
+ 
+     # --- Dataset → DataArray ---
+     if name is not None:


=====================================
debian/patches/series
=====================================
@@ -0,0 +1,2 @@
+0001-No-legend-IDs.patch
+0002-Fix-FutureWarning.patch


=====================================
debian/rules
=====================================
@@ -12,15 +12,6 @@ ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
 	rm -rf $(CURDIR)/.pybuild/docs/html/.doctrees
 	find $(CURDIR)/.pybuild/docs/html/ -type f -print0 | xargs --no-run-if-empty -0 \
 	sed -i 's|https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js|file:///usr/share/javascript/requirejs/require.min.js|g'
-	cat $(CURDIR)/.pybuild/docs/html/examples/how_to_use.html |\
-	python3 -c "import re, sys;\
-	data=sys.stdin.read();\
-	print(re.sub(r'<div class=\"highlight\"><pre>\s+mkdir -p failed(.*\s){2}</pre></div>', '', data, count=1, flags=re.M))" \
-	> $(CURDIR)/.pybuild/docs/html/examples/how_to_use.html
-	cat $(CURDIR)/.pybuild/docs/html/examples/test_map_raster_visualization.html |\
-	python3 -c "import re, sys;\
-	data=sys.stdin.read();\
-	print(re.sub(r'<div class=\"highlight\"><pre>\s+mkdir -p failed(.*\s){2}</pre></div>', '', data, count=1, flags=re.M))" \
-	> $(CURDIR)/.pybuild/docs/html/examples/test_map_raster_visualization.html
-
+	python3 debian/fixdocs.py .pybuild/docs/html/examples/how_to_use.html
+	python3 debian/fixdocs.py .pybuild/docs/html/examples/test_map_raster_visualization.html
 endif



View it on GitLab: https://salsa.debian.org/debian-gis-team/mapraster/-/compare/bbe8a368d2a753159b55b42f37a87648e49510cc...df3ad3333a80c2702c71004d2f8e7af1375456c7

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapraster/-/compare/bbe8a368d2a753159b55b42f37a87648e49510cc...df3ad3333a80c2702c71004d2f8e7af1375456c7
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/20260111/620ba60a/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list