[med-svn] [Git][med-team/python-deeptools][master] 4 commits: Cherry-pick upstream patch to fix problems with numpy 1.24 (Closes: #1027225)

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Fri Dec 30 14:28:11 GMT 2022



Nilesh Patra pushed to branch master at Debian Med / python-deeptools


Commits:
8582d9bb by Nilesh Patra at 2022-12-30T19:32:28+05:30
Cherry-pick upstream patch to fix problems with numpy 1.24 (Closes: #1027225)

- - - - -
6e298fab by Nilesh Patra at 2022-12-30T19:32:43+05:30
Bump Standards-Version to 4.6.2 (no changes needed)

- - - - -
f197cad6 by Nilesh Patra at 2022-12-30T14:26:35+00:00
Apply patches before running autopkgtests

- - - - -
47c53ade by Nilesh Patra at 2022-12-30T14:26:35+00:00
Upload to unstable

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/numpy-1.24.patch
- debian/patches/series
- debian/tests/control
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+python-deeptools (3.5.1-3) unstable; urgency=medium
+
+  * Team Upload.
+  * Cherry-pick upstream patch to fix problems with
+    numpy 1.24 (Closes: #1027225)
+  * Bump Standards-Version to 4.6.2 (no changes needed)
+  * Apply patches before running autopkgtests
+
+ -- Nilesh Patra <nilesh at debian.org>  Fri, 30 Dec 2022 19:33:06 +0530
+
 python-deeptools (3.5.1-2) unstable; urgency=medium
 
   * d/{,t/}control: depend on pytest instead of nose. (Closes: #1018477)


=====================================
debian/control
=====================================
@@ -19,7 +19,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-plotly (>=4.9.0),
                python3-deeptoolsintervals,
                python3-pytest <!nocheck>
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/python-deeptools
 Vcs-Git: https://salsa.debian.org/med-team/python-deeptools.git
 Homepage: https://github.com/deeptools/deepTools


=====================================
debian/patches/numpy-1.24.patch
=====================================
@@ -0,0 +1,65 @@
+Description: Replace np dtypes with py builtins
+Author: Nilesh Patra <nilesh at debian.org>
+Last-Update: 2022-12-30
+--- a/deeptools/heatmapper.py
++++ b/deeptools/heatmapper.py
+@@ -777,7 +777,7 @@
+             # split the line into bed interval and matrix values
+             region = line.split('\t')
+             chrom, start, end, name, score, strand = region[0:6]
+-            matrix_row = np.ma.masked_invalid(np.fromiter(region[6:], np.float))
++            matrix_row = np.ma.masked_invalid(np.fromiter(region[6:], float))
+             matrix_rows.append(matrix_row)
+             starts = start.split(",")
+             ends = end.split(",")
+@@ -852,7 +852,7 @@
+             # join np_array values
+             # keeping nans while converting them to strings
+             if not np.ma.is_masked(score_list[idx]):
+-                np.float(score_list[idx])
++                float(score_list[idx])
+             matrix_values = "\t".join(
+                 np.char.mod('%f', self.matrix.matrix[idx, :]))
+             starts = ["{0}".format(x[0]) for x in region[1]]
+@@ -1345,7 +1345,7 @@
+         to_keep = []
+         score_list = np.ma.masked_invalid(np.mean(self.matrix, axis=1))
+         for idx, region in enumerate(self.regions):
+-            if np.ma.is_masked(score_list[idx]) or np.float(score_list[idx]) == 0:
++            if np.ma.is_masked(score_list[idx]) or float(score_list[idx]) == 0:
+                 continue
+             else:
+                 to_keep.append(idx)
+--- a/deeptools/plotFingerprint.py
++++ b/deeptools/plotFingerprint.py
+@@ -240,7 +240,7 @@
+     lamb = np.mean(vec)  # Average coverage
+     coverage = np.sum(vec)
+ 
+-    chip = np.zeros(MAXLEN, dtype=np.int)
++    chip = np.zeros(MAXLEN, dtype=int)
+     for val in vec:
+         # N.B., we need to clip past the end of the array
+         if val >= MAXLEN:
+@@ -277,8 +277,8 @@
+         return np.NAN
+ 
+     # These will hold the coverage histograms
+-    chip = np.zeros(MAXLEN, dtype=np.int)
+-    input = np.zeros(MAXLEN, dtype=np.int)
++    chip = np.zeros(MAXLEN, dtype=int)
++    input = np.zeros(MAXLEN, dtype=int)
+     for row in mat:
+         # ChIP
+         val = row[idx]
+--- a/deeptools/sumCoveragePerBin.py
++++ b/deeptools/sumCoveragePerBin.py
+@@ -90,7 +90,7 @@
+             except:
+                 # bigWig input, as used by plotFingerprint
+                 if bamHandle.chroms(chrom):
+-                    _ = np.array(bamHandle.stats(chrom, regStart, regEnd, type="mean", nBins=nRegBins), dtype=np.float)
++                    _ = np.array(bamHandle.stats(chrom, regStart, regEnd, type="mean", nBins=nRegBins), dtype=float)
+                     _[np.isnan(_)] = 0.0
+                     _ = _ * tileSize
+                     coverages += _


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 tmp_inhibit_test_readFiltering.patch
 python2to3_for_executables.patch
 pytest.patch
+numpy-1.24.patch


=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
 Tests: run-unit-test
-Depends: @, python3-pytest, python3-all
+Depends: @, python3-pytest, python3-all, quilt
 Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -1,6 +1,12 @@
 #!/bin/bash
 set -e
+
+QUILT_PATCHES="debian/patches" quilt push -a || true
+
 for py in $(py3versions -s 2> /dev/null)
 do echo "Testing with $py in $(pwd):"
-    pytest-3 -v deeptools
+    pytest-3 -v deeptools --ignore=.pc
 done
+
+QUILT_PATCHES=debian/patches quilt pop -a || true
+rm -rf .pc/



View it on GitLab: https://salsa.debian.org/med-team/python-deeptools/-/compare/e85697a653466c5551a9862e4e50121fadc89f35...47c53ade6ca08a73bf2a306ba250fb1baf7bf653

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-deeptools/-/compare/e85697a653466c5551a9862e4e50121fadc89f35...47c53ade6ca08a73bf2a306ba250fb1baf7bf653
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/20221230/f461e3ce/attachment-0001.htm>


More information about the debian-med-commit mailing list