[Git][debian-gis-team/pytroll-schedule][master] 2 commits: Add upstream patch to fix random FTBFS. (closes: #1104349)
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Tue Apr 29 14:55:08 BST 2025
Bas Couwenberg pushed to branch master at Debian GIS Project / pytroll-schedule
Commits:
2a1abafb by Bas Couwenberg at 2025-04-29T15:51:03+02:00
Add upstream patch to fix random FTBFS. (closes: #1104349)
- - - - -
b9545ce2 by Bas Couwenberg at 2025-04-29T15:54:57+02:00
Update lintian overrides.
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/pr100-Fix-test-running-long.patch
- debian/patches/series
- + debian/source/lintian-overrides
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+pytroll-schedule (0.7.2-4) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Add upstream patch to fix random FTBFS.
+ (closes: #1104349)
+ * Update lintian overrides.
+
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 29 Apr 2025 15:50:33 +0200
+
pytroll-schedule (0.7.2-3) unstable; urgency=medium
[ Bas Couwenberg ]
=====================================
debian/patches/pr100-Fix-test-running-long.patch
=====================================
@@ -0,0 +1,135 @@
+Description: Fix test running long
+Author: Martin Raspaud <martin.raspaud at smhi.se>
+Origin: https://github.com/pytroll/pytroll-schedule/pull/100
+Bug: https://github.com/pytroll/pytroll-schedule/issues/99
+Bug-Debian: https://bugs.debian.org/1104349
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -37,6 +37,9 @@ compare_scheds = "trollsched.compare:run
+
+ [project.optional-dependencies]
+ doc = ["sphinx", "sphinx_rtd_theme", "sphinxcontrib-apidoc"]
++test = [
++ "pytest>=8.3.5",
++]
+
+ [build-system]
+ requires = ["hatchling", "hatch-vcs"]
+--- a/trollsched/drawing.py
++++ b/trollsched/drawing.py
+@@ -25,6 +25,7 @@
+ import logging
+ import logging.handlers
+ import os
++from tempfile import gettempdir
+
+ import matplotlib as mpl
+ import numpy as np
+@@ -47,7 +48,7 @@ if not BASEMAP_NOT_CARTOPY:
+ "CARTOPY_PRE_EXISTING_DATA_DIR", cartopy.config["pre_existing_data_dir"])
+
+
+-class MapperBasemap(object):
++class MapperBasemap:
+ """A class to generate nice plots with basemap."""
+
+ def __init__(self, **proj_info):
+@@ -74,13 +75,15 @@ class MapperBasemap(object):
+ self.map.drawparallels(np.arange(-90, 90, 30))
+
+ def __enter__(self):
++ """Enter the mapper context."""
+ return self.map
+
+ def __exit__(self, etype, value, tb):
++ """Exit the mapper context."""
+ pass
+
+
+-class MapperCartopy(object):
++class MapperCartopy:
+ """A class to generate nice plots with Cartopy."""
+
+ def __init__(self, **proj_info):
+@@ -127,24 +130,24 @@ class MapperCartopy(object):
+ fill_dark_side(self._ax, time=utctime, color=color, alpha=alpha)
+
+ def __call__(self, *args):
++ """Call the mapper."""
+ return args
+
+ def __enter__(self):
++ """Enter the mapper context."""
+ return self
+
+ def __exit__(self, etype, value, tb):
++ """Exit the mapper context."""
+ pass
+
+
+-if BASEMAP_NOT_CARTOPY:
+- Mapper = MapperBasemap
+-else:
+- Mapper = MapperCartopy
++Mapper = MapperBasemap if BASEMAP_NOT_CARTOPY else MapperCartopy
+
+
+ def save_fig(pass_obj,
+ poly=None,
+- directory="/tmp/plots",
++ directory=None,
+ overwrite=False,
+ labels=None,
+ extension=".png",
+@@ -167,6 +170,8 @@ def save_fig(pass_obj,
+ logger.debug("Save fig " + str(pass_obj))
+ rise = pass_obj.risetime.strftime("%Y%m%d%H%M%S")
+ fall = pass_obj.falltime.strftime("%Y%m%d%H%M%S")
++ if directory is None:
++ directory = os.path.join(gettempdir(), "plots")
+ if not os.path.exists(directory):
+ logger.debug("Create plot dir " + directory)
+ os.makedirs(directory)
+@@ -247,8 +252,10 @@ def main():
+ from trollsched.satpass import get_next_passes
+
+ passes = get_next_passes(["noaa 19", "suomi npp"], datetime.now(), 24, (16, 58, 0))
++
++ directory = os.path.join(gettempdir(), "plots")
+ for p in passes:
+- save_fig(p, directory="/tmp/plots/")
++ save_fig(p, directory=directory)
+
+
+ if __name__ == "__main__":
+--- a/trollsched/tests/test_schedule.py
++++ b/trollsched/tests/test_schedule.py
+@@ -45,7 +45,7 @@ class TestTools:
+ self.risetime = rise
+ self.falltime = fall
+
+- ref_time = datetime.utcnow()
++ ref_time = datetime(2020, 1, 1, 18, 0)
+ passes = [MyPass(ref_time, ref_time + timedelta(minutes=10)),
+ MyPass(ref_time + timedelta(minutes=10.01),
+ ref_time + timedelta(minutes=20))]
+@@ -372,7 +372,7 @@ def test_pyorbitals_platform_name(tmp_pa
+ with open(config_file, "w") as fd:
+ fd.write(yaml.dump(config))
+
+- run(["-c", os.fspath(config_file), "-x", "-t", os.fspath(tle_file)])
++ run(["-c", os.fspath(config_file), "-x", "-t", os.fspath(tle_file), "-s", "2024-03-30T15:00"])
+ assert sched_file in tmp_path.iterdir()
+
+
+@@ -436,7 +436,8 @@ def test_schedule_avoid(tmp_path):
+
+ start_time = datetime(2024, 5, 8, 0, 0, 0)
+ run(["-c", os.fspath(config_file), "-x", "-v", "-t", os.fspath(tle_file),
+- "--start-time", start_time.strftime("%Y-%m-%dT%H:%M:%S"), "--avoid", os.fspath(avoid_file)])
++ "--start-time", start_time.strftime("%Y-%m-%dT%H:%M:%S"),
++ "--avoid", os.fspath(avoid_file)])
+ assert sched_file in tmp_path.iterdir()
+
+ sched_file_passes = get_passes_from_xml_file([sched_file])
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
0001-Fix-shebang-string.patch
+pr100-Fix-test-running-long.patch
=====================================
debian/source/lintian-overrides
=====================================
@@ -0,0 +1,3 @@
+# False positive, Build-Depends on both python3-numpy & dh-sequence-numpy3.
+missing-build-dependency-for-dh_-command dh_numpy3 *
+
View it on GitLab: https://salsa.debian.org/debian-gis-team/pytroll-schedule/-/compare/cacc17c9ff361374bd91adbc30d3593325479c71...b9545ce2a81019fa6016993297fb398d691406f5
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pytroll-schedule/-/compare/cacc17c9ff361374bd91adbc30d3593325479c71...b9545ce2a81019fa6016993297fb398d691406f5
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/20250429/534548fc/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list