[med-svn] [Git][med-team/python-deeptoolsintervals][master] 5 commits: Add a very simple autopkgtest

Nilesh Patra gitlab at salsa.debian.org
Tue Jul 21 13:48:03 BST 2020



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


Commits:
7df663a7 by Nilesh Patra at 2020-07-21T18:14:00+05:30
Add a very simple autopkgtest

- - - - -
28feb467 by Nilesh Patra at 2020-07-21T18:14:29+05:30
Install relevant test file

- - - - -
7c020add by Nilesh Patra at 2020-07-21T18:14:55+05:30
Compat version: 13

- - - - -
3e392ed1 by Nilesh Patra at 2020-07-21T18:15:18+05:30
Add "Rules-Requires-Root:no"

- - - - -
d76f8699 by Nilesh Patra at 2020-07-21T18:16:17+05:30
Hardening flags

- - - - -


6 changed files:

- debian/control
- + debian/examples
- debian/rules
- + debian/tests/control
- + debian/tests/run-unit-test
- + debian/tests/sample_test.py


Changes:

=====================================
debian/control
=====================================
@@ -4,7 +4,7 @@ Uploaders: Steffen Moeller <moeller at debian.org>
 Section: science
 Testsuite: autopkgtest-pkg-python
 Priority: optional
-Build-Depends: debhelper-compat (= 12),
+Build-Depends: debhelper-compat (= 13),
                dh-python,
                python3-all-dev,
                python3-setuptools,
@@ -13,6 +13,7 @@ Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/med-team/python-deeptoolsintervals
 Vcs-Git: https://salsa.debian.org/med-team/python-deeptoolsintervals.git
 Homepage: https://github.com/deeptools/deeptools_intervals/
+Rules-Requires-Root: no
 
 Package: python3-deeptoolsintervals
 Architecture: any


=====================================
debian/examples
=====================================
@@ -0,0 +1 @@
+debian/tests/sample_test.py


=====================================
debian/rules
=====================================
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 export DH_VERBOSE = 1
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export PYBUILD_NAME=deeptoolsintervals
 
 %:


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


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+pkg=deeptoolsintervals
+
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/lib/python3/dist-packages/${pkg}/test/* -a "${AUTOPKGTEST_TMP}"
+cp -a /usr/share/doc/python3-${pkg}/examples/* -a  "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+ls
+
+echo 'Run sample test ....'
+python3 -m pytest -v
+


=====================================
debian/tests/sample_test.py
=====================================
@@ -0,0 +1,18 @@
+from deeptoolsintervals import GTF
+from deeptoolsintervals import Enrichment
+
+# Very basic test to check functionality
+def test_functionality():
+    gtf = GTF(["GRCh38.84.2.gtf.gz", "GRCh38.84.bed", "GRCh38.84.gtf.gz"], keepExons=True)
+    list_labels = gtf.labels
+    list_labels.sort()
+    assert(list_labels == ['GRCh38.84.2.gtf.gz', 'GRCh38.84.bed', 'GRCh38.84.gtf.gz', 'group 1', 'group 1_r1', 'group 2', 'group 3', 'group2'])
+    
+    gtf = GTF("GRCh38.84.gtf.gz", keepExons=True)
+    assert(gtf.findOverlaps("chr1", 1, 20000)[0][0] >= 11800)
+
+    gtf = Enrichment("GRCh38.84.gtf.gz", keepExons=True, attributeKey="gene_biotype")
+    overlap_result = list(gtf.findOverlaps("1", [(0, 2000000)]))
+    overlap_result.sort()
+    assert(overlap_result == 
+        ['group 1', 'group 2', 'lincRNA', 'miRNA', 'processed_pseudogene', 'protein_coding', 'transcribed_unprocessed_pseudogene', 'unprocessed_pseudogene'])



View it on GitLab: https://salsa.debian.org/med-team/python-deeptoolsintervals/-/compare/e36773556abf1dada9be7ff9dba173ed1e00c2cb...d76f8699db2ce639c34827b7d4ba42bf024eef0a

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-deeptoolsintervals/-/compare/e36773556abf1dada9be7ff9dba173ed1e00c2cb...d76f8699db2ce639c34827b7d4ba42bf024eef0a
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/20200721/fc7f11af/attachment-0001.html>


More information about the debian-med-commit mailing list