[med-svn] [Git][med-team/gubbins][master] 4 commits: d/control: gubbins depends on python3-pkg-resources.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Fri Feb 28 10:10:04 GMT 2025



Étienne Mollier pushed to branch master at Debian Med / gubbins


Commits:
de391ab4 by Étienne Mollier at 2025-02-28T10:55:12+01:00
d/control: gubbins depends on python3-pkg-resources.

- - - - -
478655e5 by Étienne Mollier at 2025-02-28T10:55:20+01:00
numpy2.patch: new: fix further autopkgtest failure with numpy 2.

Closes: #1098693

- - - - -
3e217dba by Étienne Mollier at 2025-02-28T11:09:16+01:00
d/control: declare compliance to standards version 4.7.2.

- - - - -
f5035c35 by Étienne Mollier at 2025-02-28T11:09:38+01:00
d/changelog: ready for upload to unstable.

- - - - -


4 changed files:

- debian/changelog
- debian/control
- + debian/patches/numpy2.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+gubbins (3.4-2) unstable; urgency=medium
+
+  * d/control: gubbins depends on python3-pkg-resources.
+  * numpy2.patch: new: fix further autopkgtest failure with numpy 2.
+    (Closes: #1098693)
+  * d/control: declare compliance to standards version 4.7.2.
+
+ -- Étienne Mollier <emollier at debian.org>  Fri, 28 Feb 2025 11:09:34 +0100
+
 gubbins (3.4-1) unstable; urgency=medium
 
   * New upstream version 3.4


=====================================
debian/control
=====================================
@@ -22,7 +22,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-scipy <!nocheck>,
                python3-multiprocess <!nocheck>,
                python3-wheel <!nocheck>
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
 Vcs-Browser: https://salsa.debian.org/med-team/gubbins
 Vcs-Git: https://salsa.debian.org/med-team/gubbins.git
 Homepage: https://sanger-pathogens.github.io/gubbins/
@@ -34,6 +34,7 @@ Depends: ${shlibs:Depends},
          ${misc:Depends},
          ${python3:Depends},
          python3,
+         python3-pkg-resources,
          raxml
 # FIXME: python3-numba is disabled until version 0.59 makes it back to testing.
 # Delete also remove-numba-temporarily.patch when the time comes to bring back


=====================================
debian/patches/numpy2.patch
=====================================
@@ -0,0 +1,73 @@
+Description: fix runtime failures with Numpy ≥ 2.
+ This patch fixes the following symptom when running gubbins with Numpy
+ version 2 and more:
+ .
+        Running joint ancestral reconstruction with pyjar
+        Traceback (most recent call last):
+          File "/usr/bin/run_gubbins", line 33, in <module>
+            sys.exit(load_entry_point('gubbins==3.4', 'console_scripts', 'run_gubbins.py')())
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
+          File "/usr/share/gubbins/gubbins/run_gubbins.py", line 166, in main
+            gubbins.common.parse_and_run(parser.parse_args(), parser.description)
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+          File "/usr/share/gubbins/gubbins/common.py", line 373, in parse_and_run
+            jar(sequence_names = ordered_sequence_names, # complete polymorphism alignment
+            ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+                base_patterns = base_pattern_bases_array, # array of unique base patterns in alignment
+                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+            ...<8 lines>...
+                verbose = input_args.verbose,
+                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+                max_pos = max_pos)
+                ^^^^^^^^^^^^^^^^^^
+          File "/usr/share/gubbins/gubbins/pyjar.py", line 646, in jar
+            node_pij = numpy.full((num_nodes,16), numpy.NINF, dtype=numpy.float32)
+                                                  ^^^^^^^^^^
+          File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 400, in __getattr__
+            raise AttributeError(
+            ...<3 lines>...
+            )
+        AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: https://github.com/nickjcroucher/gubbins/pull/426
+Last-Update: 2025-02-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- gubbins.orig/python/gubbins/pyjar.py
++++ gubbins/python/gubbins/pyjar.py
+@@ -64,7 +64,7 @@
+ #Calculate Pij from Q matrix and branch length
+ def calculate_pij(branch_length,rate_matrix):
+     if branch_length==0:
+-        pij = numpy.full((4,4), numpy.NINF, dtype = numpy.float32)
++        pij = numpy.full((4,4), -numpy.inf, dtype = numpy.float32)
+         numpy.fill_diagonal(pij, 0.0)
+     else:
+         pij = numpy.array(numpy.log(linalg.expm(numpy.multiply(branch_length,rate_matrix))), dtype = numpy.float32) # modified
+@@ -328,7 +328,7 @@
+     Cmat_null = numpy.array([0,1,2,3], dtype = numpy.uint8)
+         
+     # Reset matrices
+-    Lmat.fill(numpy.NINF)
++    Lmat.fill(-numpy.inf)
+     Cmat[:] = Cmat_null
+ 
+     # Count unknown bases
+@@ -537,7 +537,7 @@
+     
+     # Generate data structures for reconstructions
+     num_nodes = len(tree.nodes())
+-    Lmat = numpy.full((num_nodes,4), numpy.NINF, dtype = numpy.float32)
++    Lmat = numpy.full((num_nodes,4), -numpy.inf, dtype = numpy.float32)
+     Cmat = numpy.full((num_nodes,4), [0,1,2,3], dtype = numpy.uint8)
+     reconstructed_base_indices = numpy.full(num_nodes, 8, dtype = numpy.uint8)
+ 
+@@ -643,7 +643,7 @@
+     child_nodes_array = numpy.empty(num_nodes, dtype=object)
+     leaf_node_list = []
+     node_labels = numpy.empty(num_nodes, dtype=object)
+-    node_pij = numpy.full((num_nodes,16), numpy.NINF, dtype=numpy.float32)
++    node_pij = numpy.full((num_nodes,16), -numpy.inf, dtype=numpy.float32)
+     postordered_nodes = numpy.arange(num_nodes, dtype=numpy.int32)
+     seed_node = None
+     seed_node_edge_truncation = True


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,4 @@ iqtree2.patch
 autoupdate_configure.ac.patch
 python3-shebang.patch
 remove-numba-temporarily.patch
+numpy2.patch



View it on GitLab: https://salsa.debian.org/med-team/gubbins/-/compare/ed2d2ea4d007e24f13e667ea8b0b404499bddc95...f5035c35635aa2418d9c759cfbe6f5c10e3d7641

-- 
View it on GitLab: https://salsa.debian.org/med-team/gubbins/-/compare/ed2d2ea4d007e24f13e667ea8b0b404499bddc95...f5035c35635aa2418d9c759cfbe6f5c10e3d7641
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/debian-med-commit/attachments/20250228/e498ee1b/attachment-0001.htm>


More information about the debian-med-commit mailing list