[med-svn] [Git][med-team/kleborate][master] 6 commits: fasta.nin files will be (re)build at package installation time to not contain build path

Andreas Tille gitlab at salsa.debian.org
Thu Jan 16 12:34:07 GMT 2020



Andreas Tille pushed to branch master at Debian Med / kleborate


Commits:
9ed6e172 by Andreas Tille at 2020-01-16T10:20:51+01:00
fasta.nin files will be (re)build at package installation time to not contain build path

- - - - -
328eb790 by Andreas Tille at 2020-01-16T11:04:48+01:00
Examples package, autopkgtest

- - - - -
1ac2b2a4 by Andreas Tille at 2020-01-16T13:11:52+01:00
Fix installation

- - - - -
eb344030 by Andreas Tille at 2020-01-16T13:12:31+01:00
Upload to new

- - - - -
eef8485d by Andreas Tille at 2020-01-16T13:33:19+01:00
Add interpreter line

- - - - -
71386b62 by Andreas Tille at 2020-01-16T13:33:54+01:00
Depends: ${misc:Depends}

- - - - -


14 changed files:

- + debian/README.test
- debian/changelog
- debian/control
- + debian/kleborate-examples.install
- + debian/kleborate.docs
- + debian/kleborate.install
- debian/manpages → debian/kleborate.manpages
- + debian/kleborate.postinst
- + debian/kleborate.prerm
- debian/rules
- + debian/tests/control
- − debian/tests/control_readme
- debian/tests/data/get-data
- + debian/tests/run-unit-test


Changes:

=====================================
debian/README.test
=====================================
@@ -0,0 +1,9 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test if you install
+the package kleborate-examples and run
+
+    sh run-unit-test
+
+in order to confirm its integrity.


=====================================
debian/changelog
=====================================
@@ -1,5 +1,5 @@
-kleborate (1.0.0-1) UNRELEASED; urgency=medium
+kleborate (1.0.0-1) unstable; urgency=medium
 
-  * Initial release (Closes: #<bug>)
+  * Initial release (Closes: #949030)
 
- -- Andreas Tille <tille at debian.org>  Wed, 15 Jan 2020 21:44:54 +0100
+ -- Andreas Tille <tille at debian.org>  Thu, 16 Jan 2020 13:12:17 +0100


=====================================
debian/control
=====================================
@@ -37,3 +37,23 @@ Description: tool to screen Klebsiella genome assemblies
     and colistin resistance truncations
   * K (capsule) and O antigen (LPS) serotype prediction, via wzi alleles
     and Kaptive
+
+Package: kleborate-examples
+Architecture: all
+Depends: ${misc:Depends}
+Recommends: kleborate
+Description: tool to screen Klebsiella genome assemblies (example data)
+ Kleborate is a tool to screen Klebsiella genome assemblies for:
+ .
+  * MLST sequence type
+  * species (e.g. K. pneumoniae, K. quasipneumoniae, K. variicola, etc.)
+  * ICEKp associated virulence loci: yersiniabactin (ybt),
+    colibactin (clb)
+  * virulence plasmid associated loci: salmochelin (iro), aerobactin
+    (iuc), hypermucoidy (rmpA, rmpA2)
+  * antimicrobial resistance genes, including quinolone resistance SNPs
+    and colistin resistance truncations
+  * K (capsule) and O antigen (LPS) serotype prediction, via wzi alleles
+    and Kaptive
+ .
+ This package provides example data end tests that are used in autopkgtest.


=====================================
debian/kleborate-examples.install
=====================================
@@ -0,0 +1,2 @@
+debian/tests/data		usr/share/doc/kleborate/examples
+debian/tests/run-unit-test	usr/share/doc/kleborate/


=====================================
debian/kleborate.docs
=====================================
@@ -0,0 +1,2 @@
+README*
+debian/README.test


=====================================
debian/kleborate.install
=====================================
@@ -0,0 +1,2 @@
+usr/bin
+usr/lib


=====================================
debian/manpages → debian/kleborate.manpages
=====================================


=====================================
debian/kleborate.postinst
=====================================
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    configure)
+	ls -l /usr/lib/python3*/dist-packages/kleborate/data/
+	find /usr/lib/python3* -name "*.fasta" | grep kleborate
+	for fasta in /usr/lib/python3/dist-packages/kleborate/data/*.fasta ; do
+	    makeblastdb -dbtype nucl -in "$fasta" > /dev/null
+	done
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+


=====================================
debian/kleborate.prerm
=====================================
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    remove|purge|upgrade|deconfigure)
+	rm -f /usr/lib/python3/dist-packages/kleborate/data/*.fasta.nin
+    ;;
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+


=====================================
debian/rules
=====================================
@@ -2,3 +2,8 @@
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_install:
+	dh_install
+	# fasta.nin files will be (re)build at package installation time to not contain build path
+	find debian -name "*.fasta.nin" -delete


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


=====================================
debian/tests/control_readme deleted
=====================================
@@ -1,8 +0,0 @@
-Upstream provided a script test.sh which unfortunately does not work:
-
-$ kleborate -p . -o details.txt *.fna
-usage: kleborate -a ASSEMBLIES [ASSEMBLIES ...] [-r] [-s] [--kaptive_k]
-                 [--kaptive_o] [-k] [--all] [-o OUTFILE]
-                 [--kaptive_k_outfile KAPTIVE_K_OUTFILE]
-                 [--kaptive_o_outfile KAPTIVE_O_OUTFILE] [-h] [--version]
-kleborate: error: the following arguments are required: -a/--assemblies


=====================================
debian/tests/data/get-data
=====================================
@@ -1,3 +1,4 @@
+#!/bin/sh
 ## Adopted from test.sh script to just obtain the data
 #
 # NTUH-K2044 (ST23, ybt 2; ICEKp1)


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+pkg=kleborate
+export LC_ALL=C.UTF-8
+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/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"/data
+
+unxz *.xz
+
+kleborate -o results.txt -a *.fna
+kleborate --resistance -o resistance_results.txt -a *.fna
+kleborate --all -o all_results.txt -a *.fna



View it on GitLab: https://salsa.debian.org/med-team/kleborate/compare/6bb7cac555adb0014e2a5171c034bc77d6c909f5...71386b6270cfa4edfafcfeb1c0db5b159d380ab3

-- 
View it on GitLab: https://salsa.debian.org/med-team/kleborate/compare/6bb7cac555adb0014e2a5171c034bc77d6c909f5...71386b6270cfa4edfafcfeb1c0db5b159d380ab3
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/20200116/b187e385/attachment-0001.html>


More information about the debian-med-commit mailing list