[med-svn] [Git][med-team/sift][master] 2 commits: Add autopkgtest and use Debian packaged BLIMPS data

Andreas Tille (@tille) gitlab at salsa.debian.org
Tue Oct 20 12:09:17 BST 2026



Andreas Tille pushed to branch master at Debian Med / sift


Commits:
e3227ddf by Andreas Tille at 2026-10-20T12:58:37+02:00
Add autopkgtest and use Debian packaged BLIMPS data

- - - - -
86de957d by Andreas Tille at 2026-10-20T13:00:31+02:00
Upload to unstable

- - - - -


7 changed files:

- − debian/README.Debian
- + debian/README.test
- debian/changelog
- debian/docs
- debian/patches/fix_perl_interpreter_and_lib_path
- + debian/tests/control
- + debian/tests/run-unit-test


Changes:

=====================================
debian/README.Debian deleted
=====================================
@@ -1,6 +0,0 @@
-sift for Debian
----------------
-
-This package presents `sift-3.0'. Tested only for FASTA input.
-
- -- Laszlo Kajan <lkajan at rostlab.org>  Mon, 07 Dec 2009 15:22:27 +0100


=====================================
debian/README.test
=====================================
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+    sh run-unit-test
+
+in order to confirm its integrity.


=====================================
debian/changelog
=====================================
@@ -1,4 +1,4 @@
-sift (6.2.1+ds-1) UNRELEASED; urgency=medium
+sift (6.2.1+ds-1) unstable; urgency=medium
 
   [ Andreas Tille ]
   * Fix Homepage
@@ -8,6 +8,9 @@ sift (6.2.1+ds-1) UNRELEASED; urgency=medium
   * Remove all binaries from source
   * Remove now unneeded lintian-overrides
   * Use Debian packaged libblimps
+  * Use BLIMPS data from /usr/share/blimps provided by blimps-utils
+  * Add autopkgtest
+    Closes: #986200
   * cme fix dpkg-control
   * Cleanup docs
 
@@ -15,7 +18,7 @@ sift (6.2.1+ds-1) UNRELEASED; urgency=medium
   * Do not install prebuild binaries from bin/web
     Closes: #1150426
 
- -- Andreas Tille <tille at debian.org>  Tue, 20 Oct 2026 08:14:38 +0200
+ -- Andreas Tille <tille at debian.org>  Tue, 20 Oct 2026 12:59:20 +0200
 
 sift (6.2.1-2) unstable; urgency=medium
 


=====================================
debian/docs
=====================================
@@ -1 +1,3 @@
 VERSION_UPDATE
+debian/tests/run-unit-test
+debian/README.test


=====================================
debian/patches/fix_perl_interpreter_and_lib_path
=====================================
@@ -1693,7 +1693,7 @@ Index: sift/src/sift_blimps.h
 +inline const char*		getblimpsdir()
 +{
 +	const char* blimps_dir = getenv ("BLIMPS_DIR");
-+	if( blimps_dir == NULL ) blimps_dir = __MAKE_PREFIX__ "/share/sift/blimps";
++	if( blimps_dir == NULL ) blimps_dir = __MAKE_PREFIX__ "/share/blimps";
 +
 +	return blimps_dir;
 +}


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,2 @@
+Tests: run-unit-test
+Depends: sift, blimps-utils


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,56 @@
+#!/bin/sh
+set -e
+
+pkg=sift
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  # shellcheck disable=SC2064
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/lacI.alignedfasta "${AUTOPKGTEST_TMP}"
+cp -a /usr/share/doc/${pkg}/examples/lacI.subst "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+if ! /usr/bin/info_on_seqs lacI.alignedfasta lacI.subst lacI.SIFTprediction \
+        > info-on-seqs.log 2>&1; then
+    echo "info_on_seqs failed:" >&2
+    cat info-on-seqs.log >&2
+    exit 1
+fi
+
+awk -F '\t' '
+BEGIN {
+    substitution[1] = "K2S";  prediction[1] = "TOLERATED"
+    substitution[2] = "P3M";  prediction[2] = "TOLERATED"
+    substitution[3] = "V15K"; prediction[3] = "DELETERIOUS"
+}
+{
+    if (!(NR in substitution)) {
+        printf "unexpected output line %d: %s\n", NR, $0 > "/dev/stderr"
+        exit 1
+    }
+    if (NF != 6) {
+        printf "line %d: expected 6 fields, got %d\n", NR, NF > "/dev/stderr"
+        exit 1
+    }
+    if ($1 != substitution[NR] || $2 != prediction[NR]) {
+        printf "line %d: expected %s %s, got %s %s\n", NR,
+               substitution[NR], prediction[NR], $1, $2 > "/dev/stderr"
+        exit 1
+    }
+    if ($3 !~ /^[0-9]+\.[0-9]+$/ || $3 < 0 || $3 > 1) {
+        printf "line %d: invalid SIFT score: %s\n", NR, $3 > "/dev/stderr"
+        exit 1
+    }
+}
+END {
+    if (NR != 3) {
+        printf "expected 3 predictions, got %d\n", NR > "/dev/stderr"
+        exit 1
+    }
+}
+' lacI.SIFTprediction



View it on GitLab: https://salsa.debian.org/med-team/sift/-/compare/4137a577a7d678b63f82fba4e43c3bc98992a7a7...86de957da8be38d58a1b3798c55bedd83b84cd84

-- 
View it on GitLab: https://salsa.debian.org/med-team/sift/-/compare/4137a577a7d678b63f82fba4e43c3bc98992a7a7...86de957da8be38d58a1b3798c55bedd83b84cd84
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261020/d6dd6ccf/attachment-0001.htm>


More information about the debian-med-commit mailing list