[med-svn] [pdb2pqr] 01/02: add README.test, docs, examples and simple testsuite

Tatiana Malygina latticetower-guest at moszumanska.debian.org
Mon Jun 13 16:27:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

latticetower-guest pushed a commit to branch master
in repository pdb2pqr.

commit 13158d4f4d5a716256703dad47060a8b72779cf1
Author: latticetower-guest <merlettaia at gmail.com>
Date:   Sat Jun 11 21:26:38 2016 +0000

    add README.test, docs, examples and simple testsuite
---
 debian/README.test             | 30 ++++++++++++++++++++++++++++
 debian/changelog               |  7 +++++++
 debian/docs                    |  2 ++
 debian/examples                |  1 +
 debian/tests/control           |  3 +++
 debian/tests/installation-test | 44 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 87 insertions(+)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..9ab7270
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,30 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by executing
+
+    sh installation-test
+
+in order to confirm its integrity.
+During data processing, package can write multiple warning messages to stderr. 
+This output means that PDB file contains erranous data, which could be repaired
+by pdb2pqr. In `installation-test` script these messages should appear. 
+
+For this to be processed in autopkgtest testsuite, `allow-stderr` restriction 
+is set.
+
+To test manually, run `pdb2pqr` like this (program output will be saved to 
+`output.txt` in current directory):
+
+```
+pdb2pqr --ff=amber <valid PDB ID> output.txt
+```
+
+Possible PDB IDs can be found in RCSB PDB database [1] and other sources.
+
+To see other options, call `pdb2pqr` without parameters or with `-h` key.
+
+References:
+
+[1]: RCSB PDB database (one of the possible sources of .pdb files)
+    http://www.rcsb.org/pdb/home/home.do
diff --git a/debian/changelog b/debian/changelog
index 3f02a6d..8ac8b5c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+pdb2pqr (2.1.1+dfsg-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * add README.test, docs, examples and simple testsuite
+
+ -- Tatiana Malygina <merlettaia at gmail.com>  Mon, 13 Jun 2016 15:31:19 +0000
+
 pdb2pqr (2.1.1+dfsg-1) unstable; urgency=medium
 
   * New upstream version
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..031ed39
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+debian/README.test
+debian/tests/installation-test
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..e39721e
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+examples/*
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..8d154a1
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: installation-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/installation-test b/debian/tests/installation-test
new file mode 100644
index 0000000..5c89640
--- /dev/null
+++ b/debian/tests/installation-test
@@ -0,0 +1,44 @@
+#!/bin/sh
+# autopkgtest check: build and run with default test data
+# Author: Tatiana Malygina <merlettaia at gmail.com>
+
+set -e
+
+pkg=pdb2pqr
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $ADTTMP
+
+cp -a /usr/share/doc/${pkg}/examples/* .
+find . -type f -name "*.gz" -exec gunzip \{\} \;
+for lnk in `find . -type l -name "*.gz"` ; do
+    ln -s `basename $(readlink $lnk) .gz` `echo $lnk | sed 's/\.gz$//'`
+    rm $lnk
+done
+
+echo "Run pdb2pqr..."
+pdb2pqr --ff=amber "1FAS" output.txt
+[ -s output.txt ]
+
+# following were adopted from fabfile.py, 
+#     method "linux_bin_cross_platform_test":
+pdb2pqr --ff=parse --verbose --ligand=ligands/LIG_1ABF.mol2 1ABF 1ABF.pqr
+
+## following fails (this call also present in fabfile.py):
+# pdb2pqr --with-ph=7.0 --ph-calc-method=pdb2pka --ff=parse --verbose 1a1p 1a1p.pqr
+## Traceback:
+## Running PDB2PKA and applying at pH 7.00... 
+## Traceback (most recent call last):
+##  File "/usr/bin/pdb2pqr", line 62, in <module>
+##    mainCommand(sys.argv)
+##  File "/usr/share/pdb2pqr/main.py", line 740, in mainCommand
+##    include_old_header = options.include_header)
+##  File "/usr/share/pdb2pqr/main.py", line 341, in runPDB2PQR
+##    myRoutines.runPDB2PKA(ph, ff, pdblist, ligand, verbose, ph_calc_options)
+##  File "/usr/share/pdb2pqr/src/routines.py", line 1503, in runPDB2PKA
+##    import pka
+## ImportError: No module named pka

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pdb2pqr.git



More information about the debian-med-commit mailing list