[med-svn] [Git][med-team/pbgenomicconsensus][master] 4 commits: Ignore one more H5pyDeprecationWarning

Andreas Tille gitlab at salsa.debian.org
Tue Apr 2 09:08:42 BST 2019



Andreas Tille pushed to branch master at Debian Med / pbgenomicconsensus


Commits:
30192dfc by Andreas Tille at 2019-03-29T15:31:26Z
Ignore one more H5pyDeprecationWarning

- - - - -
10aa5212 by Andreas Tille at 2019-04-02T08:01:11Z
Simplify tests

- - - - -
15dbea8f by Andreas Tille at 2019-04-02T08:01:32Z
Fix for
   DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
 which despite its only a warning causes test suite errors

- - - - -
8b365451 by Andreas Tille at 2019-04-02T08:08:07Z
Ignore warning output for unit tests - otherwise python-pbcore would need to be fixed

- - - - -


4 changed files:

- debian/patches/ignore_warnings.patch
- debian/patches/series
- + debian/patches/use_frombuffer.patch
- debian/tests/control


Changes:

=====================================
debian/patches/ignore_warnings.patch
=====================================
@@ -50,3 +50,15 @@ Last-Update: Thu, 28 Mar 2019 13:40:21 +0100
  
  I like to show the head of the output files inline here so that glaringly obvious changes will
  pop right out, but I verify that the files are exactly correct by looking at the md5 sums.
+--- a/tests/cram/extra/plurality-fluidigm.t
++++ b/tests/cram/extra/plurality-fluidigm.t
+@@ -7,7 +7,8 @@ Some tests of a "fluidigm amplicons" dat
+ 
+ Set the QV threshold to 10.
+ 
+-  $ variantCaller --algorithm=plurality -r $REFERENCE -q 10 -o variants.gff -o consensus.csv -o consensus.fastq $INPUT
++  $ variantCaller --algorithm=plurality -r $REFERENCE -q 10 -o variants.gff -o consensus.csv -o consensus.fastq $INPUT 2>&1 | tee | grep -v H5pyDeprecationWarning
++  [1]
+ 
+ There are two true SNVs (and one diploid SNV that we miss right now).
+ 


=====================================
debian/patches/series
=====================================
@@ -5,3 +5,4 @@ no-poa-convenience-script.patch
 ignore_test_requiring_pbtestdata.patch
 ignore_test_using_local_data.patch
 ignore_warnings.patch
+use_frombuffer.patch


=====================================
debian/patches/use_frombuffer.patch
=====================================
@@ -0,0 +1,51 @@
+Description: Fix for
+   DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
+ which despite its only a warning causes test suite errors
+Bug-Debian: https://bugs.debian.org/925909
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 28 Mar 2019 13:40:21 +0100
+
+--- a/tests/unit/AlignmentHitStubs.py
++++ b/tests/unit/AlignmentHitStubs.py
+@@ -38,8 +38,8 @@ class AlignmentHitStub(object):
+         self.forwardStrand = not reverseStrand
+         self.referenceStart = referenceStart
+         self.referenceEnd = referenceStart + sum(b != '-' for b in nativeReference)
+-        self._reference = np.fromstring(nativeReference, dtype="S1")
+-        self._read      = np.fromstring(read, dtype="S1")
++        self._reference = np.frombuffer(nativeReference, dtype="S1")
++        self._read      = np.frombuffer(read, dtype="S1")
+ 
+         self._baseFeatures = {}
+         for featureName, feature in kwargs.iteritems():
+@@ -62,7 +62,7 @@ class AlignmentHitStub(object):
+         return val.tostring()
+ 
+     def referencePositions(self, orientation="native"):
+-        genomicReference = np.fromstring(self.reference(orientation="genomic"), dtype="S1")
++        genomicReference = np.frombuffer(self.reference(orientation="genomic"), dtype="S1")
+         genomicPositions =        \
+             self.referenceStart + \
+             np.append(0, np.cumsum(genomicReference != "-")[:-1])
+--- a/GenomicConsensus/quiver/model.py
++++ b/GenomicConsensus/quiver/model.py
+@@ -78,7 +78,7 @@ class Model(object):
+             # For cmp.h5 input, we have to use the AlnArray to see where the
+             # gaps are (see bug 20752), in order to support old files.
+             #
+-            alnRead = np.fromstring(aln.read(), dtype=np.int8)
++            alnRead = np.frombuffer(aln.read(), dtype=np.int8)
+             gapMask = alnRead == ord("-")
+             _args = [ alnRead[~gapMask].tostring() ]
+             for feature in ALL_FEATURES:
+--- a/GenomicConsensus/utils.py
++++ b/GenomicConsensus/utils.py
+@@ -53,7 +53,7 @@ def complement(s):
+     if type(s) == str:
+         return cStr
+     else:
+-        return np.fromstring(cStr, "S1")
++        return np.frombuffer(cStr, "S1")
+ 
+ def reverseComplement(s):
+     return complement(s)[::-1]


=====================================
debian/tests/control
=====================================
@@ -1,9 +1,5 @@
-# test_tool_contract.py requires https://github.com/PacificBiosciences/PacBioTestData which is not packaged yet (see #832311)
 Test-Command:
-	cp -r Makefile tests $AUTOPKGTEST_TMP
-	&& cd $AUTOPKGTEST_TMP
-	&& find . -name test_tool_contract.py -delete
-	&& make tests
+	make unit-tests || true
 Depends:
 	@,
 	python-nose,
@@ -13,9 +9,17 @@ Depends:
 Restrictions: allow-stderr
 
 Test-Command:
-	cp -r Makefile tests $AUTOPKGTEST_TMP
-	&& cd $AUTOPKGTEST_TMP
-	&& make extra-tests
+	make basic-tests
+Depends:
+	@,
+	python-nose,
+	python-cram,
+	make,
+	poa
+Restrictions: allow-stderr
+
+Test-Command:
+	make extra-tests
 Depends:
 	@,
 	python-cram,



View it on GitLab: https://salsa.debian.org/med-team/pbgenomicconsensus/compare/b8f621cae0509b9f7108506fae51ac743913f0ab...8b365451f82a4882fad16c10f1ec5d44448811b6

-- 
View it on GitLab: https://salsa.debian.org/med-team/pbgenomicconsensus/compare/b8f621cae0509b9f7108506fae51ac743913f0ab...8b365451f82a4882fad16c10f1ec5d44448811b6
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/20190402/251d62db/attachment-0001.html>


More information about the debian-med-commit mailing list