[med-svn] [python-freecontact] 08/10: Imported Upstream version 1.1
Laszlo Kajan
lkajan at alioth.debian.org
Thu Sep 19 17:37:20 UTC 2013
This is an automated email from the git hooks/post-receive script.
lkajan pushed a commit to branch master
in repository python-freecontact.
commit 7df0af84a4be6a81ca339f7b1116a63f330e756a
Author: Laszlo Kajan <lkajan at debian.org>
Date: Thu Sep 19 19:23:16 2013 +0200
Imported Upstream version 1.1
---
Changes | 4 ++++
PKG-INFO | 2 +-
setup.py | 2 +-
src/freecontact.cpp | 2 +-
test/test01.py | 19 ++++++++++---------
5 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/Changes b/Changes
index 5e0b69b..2f88911 100644
--- a/Changes
+++ b/Changes
@@ -1,4 +1,8 @@
Revision history for Python module freecontact.
+1.1 Thu Sep 19 18:49:41 CEST 2013
+ - Increased test precision threshold to match Perl module.
+ - Made test fail (instead of be skipped) when module is not found.
+
1.0 Wed Jul 17 18:27:02 CEST 2013
- original version
diff --git a/PKG-INFO b/PKG-INFO
index d08c238..2704aba 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: python-freecontact
-Version: 1.0
+Version: 1.1
Summary: fast protein contact predictor
Home-page: http://rostlab.org/
Author: Laszlo Kajan
diff --git a/setup.py b/setup.py
index 6bf26b9..7781985 100755
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ from distutils.core import setup, Extension
from glob import glob
setup( name = 'python-freecontact',
- version = '1.0',
+ version = '1.1',
author = 'Laszlo Kajan',
author_email = 'lkajan at rostlab.org',
description = 'fast protein contact predictor',
diff --git a/src/freecontact.cpp b/src/freecontact.cpp
index 6a517f5..8486a49 100644
--- a/src/freecontact.cpp
+++ b/src/freecontact.cpp
@@ -344,7 +344,7 @@ BOOST_PYTHON_MODULE(freecontact)
"========\n"
"import freecontact\n"
"\n"
-"EXAMPLE = open('/mnt/home/lkajan/project/rostlab/python-freecontact/examples/demo_1000.aln', 'r')\n"
+"EXAMPLE = open('/usr/share/doc/python-freecontact/examples/demo_1000.aln', 'r')\n"
"aln = EXAMPLE.readlines(); aln = map(lambda s: s.rstrip(), aln)\n"
"EXAMPLE.close()\n"
"\n"
diff --git a/test/test01.py b/test/test01.py
index 9dad5a7..8c7519d 100755
--- a/test/test01.py
+++ b/test/test01.py
@@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+import freecontact
import unittest
from test import test_support
@@ -23,22 +24,22 @@ class MyTestCase1(unittest.TestCase):
# Only use setUp() and tearDown() if necessary
def setUp(self):
- self.fc = test_support.import_module('freecontact')
+ pass
def tearDown(self):
pass # ... code to execute to clean up after tests ...
def test1(self):
- ps = self.fc.get_ps_evfold()
+ ps = freecontact.get_ps_evfold()
assert ps['clustpc'] == 0.7
- ps = self.fc.get_ps_psicov()
+ ps = freecontact.get_ps_psicov()
assert ps['clustpc'] == 0.62
- self.fc.get_ps_psicov_sd()
+ freecontact.get_ps_psicov_sd()
def test2(self):
- fcp = self.fc.Predictor()
+ fcp = freecontact.Predictor()
assert fcp.dbg == False
- fcp = self.fc.Predictor(dbg = True)
+ fcp = freecontact.Predictor(dbg = True)
assert fcp.dbg == True
def test3(self):
@@ -48,10 +49,10 @@ class MyTestCase1(unittest.TestCase):
num_threads = 1
evfold_24_42 = 0.0129471030086279 # 0-based indices
- prec_threshold = 5e-5
+ prec_threshold = 3e-4
timing = {}
- fcp = self.fc.Predictor(dbg = True)
+ fcp = freecontact.Predictor(dbg = True)
# run with timing test
res = fcp.run(ali = aln, num_threads = num_threads, timing = timing)
@@ -60,7 +61,7 @@ class MyTestCase1(unittest.TestCase):
# run psicov with icme_timeout exception test
try:
- args = self.fc.get_ps_psicov(); args.update({'ali': aln, 'num_threads': num_threads, 'icme_timeout': 2, 'timing': None})
+ args = freecontact.get_ps_psicov(); args.update({'ali': aln, 'num_threads': num_threads, 'icme_timeout': 2, 'timing': None})
fcp.run(**args) # this is expected to fail
assert False # fail if fell through
except RuntimeError as e:
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/python-freecontact.git
More information about the debian-med-commit
mailing list