From 1e17004971507b2733cf4283480832b49c8108f8 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 6 Aug 2019 19:41:03 +0200 Subject: [PATCH] 0.15.3+ds-1 --- debian/changelog | 6 ++ debian/patches/series | 2 - .../skip_test_needing_missing_data.patch | 22 ------ debian/patches/skip_test_remote.patch | 10 +-- debian/patches/spelling | 12 ++-- debian/patches/test_index_not_compression | 70 ------------------- 6 files changed, 15 insertions(+), 107 deletions(-) delete mode 100644 debian/patches/skip_test_needing_missing_data.patch delete mode 100644 debian/patches/test_index_not_compression diff --git a/debian/changelog b/debian/changelog index b9b5534..5aec471 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-pysam (0.15.3+ds-1) UNRELEASED; urgency=medium + + * New upstream release. + + -- Michael R. Crusoe Tue, 06 Aug 2019 19:37:44 +0200 + python-pysam (0.15.2+ds-2) unstable; urgency=medium * Team upload. diff --git a/debian/patches/series b/debian/patches/series index b6c4823..6f406d9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,2 @@ skip_test_remote.patch -skip_test_needing_missing_data.patch spelling -test_index_not_compression diff --git a/debian/patches/skip_test_needing_missing_data.patch b/debian/patches/skip_test_needing_missing_data.patch deleted file mode 100644 index d4f2563..0000000 --- a/debian/patches/skip_test_needing_missing_data.patch +++ /dev/null @@ -1,22 +0,0 @@ -Description: do not depend from non-existing data file in make test target - (There is no such file example_reverse_complement.bam) -Author: Andreas Tille -Last-Update: Sat, 17 Feb 2018 15:24:34 +0100 -Forwarded: https://github.com/pysam-developers/pysam/issues/626 - -Index: python-pysam/tests/AlignmentFile_test.py -=================================================================== ---- python-pysam.orig/tests/AlignmentFile_test.py -+++ python-pysam/tests/AlignmentFile_test.py -@@ -1402,11 +1402,6 @@ class TestEmptyHeader(unittest.TestCase) - 'example_empty_header.bam')) - self.assertEqual(s.header.to_dict(), {'SQ': [{'LN': 1000, 'SN': 'chr1'}]}) - -- def test_bam_without_seq_in_header(self): -- s = pysam.AlignmentFile(os.path.join(BAM_DATADIR, "example_no_seq_in_header.bam")) -- self.assertTrue("SQ" in s.header.to_dict()) -- self.assertTrue("@SQ" in str(s.header)) -- - - class TestMismatchingHeader(unittest.TestCase): - '''see issue 716.''' diff --git a/debian/patches/skip_test_remote.patch b/debian/patches/skip_test_remote.patch index 4065c70..d9f3c1e 100644 --- a/debian/patches/skip_test_remote.patch +++ b/debian/patches/skip_test_remote.patch @@ -2,11 +2,9 @@ Author: Andreas Tille Last-Update: Tue, 11 Sep 2018 14:12:55 +0200 Description: Skip tests trying to access remote site -Index: python-pysam/tests/AlignmentFile_test.py -=================================================================== --- python-pysam.orig/tests/AlignmentFile_test.py +++ python-pysam/tests/AlignmentFile_test.py -@@ -1623,6 +1623,7 @@ class TestDoubleFetchCRAMWithReference(T +@@ -1631,6 +1631,7 @@ reference_filename = os.path.join(BAM_DATADIR, 'ex1.fa') @@ -14,11 +12,9 @@ Index: python-pysam/tests/AlignmentFile_test.py class TestRemoteFileFTP(unittest.TestCase): '''test remote access. -Index: python-pysam/tests/tabix_test.py -=================================================================== --- python-pysam.orig/tests/tabix_test.py +++ python-pysam/tests/tabix_test.py -@@ -1039,6 +1039,7 @@ for vcf_file in vcf_files: +@@ -1014,6 +1014,7 @@ globals()[n] = type(n, (TestVCFFromVariantFile,), dict(filename=vcf_file,)) @@ -26,7 +22,7 @@ Index: python-pysam/tests/tabix_test.py class TestRemoteFileHTTP(unittest.TestCase): url = "http://genserv.anat.ox.ac.uk/downloads/pysam/test/example.gtf.gz" -@@ -1078,25 +1079,28 @@ class TestRemoteFileHTTP(unittest.TestCa +@@ -1053,25 +1054,28 @@ self.assertEqual(list(self.local_file.header), []) diff --git a/debian/patches/spelling b/debian/patches/spelling index 579aa32..e832c94 100644 --- a/debian/patches/spelling +++ b/debian/patches/spelling @@ -24,7 +24,7 @@ Subject: Fix spelling typos, courtesy of lintian --- python-pysam.orig/pysam/libcalignedsegment.pyx +++ python-pysam/pysam/libcalignedsegment.pyx -@@ -2244,7 +2244,7 @@ +@@ -2238,7 +2238,7 @@ *value*. An existing value of the same *tag* will be overwritten unless @@ -35,7 +35,7 @@ Subject: Fix spelling typos, courtesy of lintian If *value* is None, the tag will be deleted. --- python-pysam.orig/pysam/libcalignmentfile.pyx +++ python-pysam/pysam/libcalignmentfile.pyx -@@ -1023,7 +1023,7 @@ +@@ -1028,7 +1028,7 @@ See :meth:`~pysam.HTSFile.parse_region` for more information on how genomic regions can be specified. :term:`reference` and @@ -44,7 +44,7 @@ Subject: Fix spelling typos, courtesy of lintian for :term:`contig` and `stop`, respectively. Without a `contig` or `region` all mapped reads in the file -@@ -1206,7 +1206,7 @@ +@@ -1211,7 +1211,7 @@ """perform a :term:`pileup` within a :term:`region`. The region is specified by :term:`contig`, `start` and `stop` (using 0-based indexing). :term:`reference` and `end` are also accepted for @@ -53,7 +53,7 @@ Subject: Fix spelling typos, courtesy of lintian respectively. Alternatively, a samtools 'region' string can be supplied. -@@ -1355,7 +1355,7 @@ +@@ -1360,7 +1360,7 @@ The region is specified by :term:`contig`, `start` and `stop`. :term:`reference` and `end` are also accepted for backward @@ -62,7 +62,7 @@ Subject: Fix spelling typos, courtesy of lintian respectively. Alternatively, a :term:`samtools` :term:`region` string can be supplied. -@@ -1459,7 +1459,7 @@ +@@ -1464,7 +1464,7 @@ The region is specified by :term:`contig`, `start` and `stop`. :term:`reference` and `end` are also accepted for backward @@ -73,7 +73,7 @@ Subject: Fix spelling typos, courtesy of lintian --- python-pysam.orig/pysam/libchtslib.pxd +++ python-pysam/pysam/libchtslib.pxd -@@ -2502,7 +2502,7 @@ +@@ -2513,7 +2513,7 @@ # 2 if the file is a stream and thus unseekable # 1 if the file contains an EOF block # 0 if the file does not contain an EOF block diff --git a/debian/patches/test_index_not_compression b/debian/patches/test_index_not_compression deleted file mode 100644 index b5ca774..0000000 --- a/debian/patches/test_index_not_compression +++ /dev/null @@ -1,70 +0,0 @@ -From: Michael R. Crusoe -Subject: Test Tabix index contents, not the compression - -Fixes: https://github.com/samtools/htslib/issues/827 - ---- python-pysam.orig/tests/tabix_test.py -+++ python-pysam/tests/tabix_test.py -@@ -14,8 +14,6 @@ - import subprocess - import glob - import re --import copy --import tempfile - from TestUtils import check_url, load_and_convert, TABIX_DATADIR, get_temp_filename - - IS_PYTHON3 = sys.version_info[0] >= 3 -@@ -64,6 +62,17 @@ - return found - - -+def checkGZBinaryEqual(filename1, filename2): -+ '''return true if the two files are binary equal.''' -+ with gzip.open(filename1, "rb") as infile1: -+ d1 = infile1.read() -+ with gzip.open(filename2, "rb") as infile2: -+ d2 = infile2.read() -+ if d1 == d2: -+ return True -+ return False -+ -+ - class TestIndexing(unittest.TestCase): - filename = os.path.join(TABIX_DATADIR, "example.gtf.gz") - filename_idx = os.path.join(TABIX_DATADIR, "example.gtf.gz.tbi") -@@ -77,7 +86,7 @@ - '''test indexing via preset.''' - - pysam.tabix_index(self.tmpfilename, preset="gff") -- self.assertTrue(checkBinaryEqual( -+ self.assertTrue(checkGZBinaryEqual( - self.tmpfilename + ".tbi", self.filename_idx)) - - def test_indexing_to_custom_location_works(self): -@@ -86,7 +95,7 @@ - index_path = get_temp_filename(suffix='custom.tbi') - pysam.tabix_index(self.tmpfilename, preset="gff", - index=index_path, force=True) -- self.assertTrue(checkBinaryEqual(index_path, self.filename_idx)) -+ self.assertTrue(checkGZBinaryEqual(index_path, self.filename_idx)) - os.unlink(index_path) - - def test_indexing_with_explict_columns_works(self): -@@ -98,7 +107,7 @@ - end_col=4, - line_skip=0, - zerobased=False) -- self.assertTrue(checkBinaryEqual( -+ self.assertTrue(checkGZBinaryEqual( - self.tmpfilename + ".tbi", self.filename_idx)) - - def test_indexing_with_lineskipping_works(self): -@@ -109,7 +118,7 @@ - end_col=4, - line_skip=1, - zerobased=False) -- self.assertFalse(checkBinaryEqual( -+ self.assertFalse(checkGZBinaryEqual( - self.tmpfilename + ".tbi", self.filename_idx)) - - def tearDown(self): -- 2.30.2