[med-svn] [Git][med-team/plip][upstream] New upstream version 2.1.6+dfsg
Nilesh Patra
gitlab at salsa.debian.org
Wed Nov 11 13:59:35 GMT 2020
Nilesh Patra pushed to branch upstream at Debian Med / plip
Commits:
a768dc00 by Nilesh Patra at 2020-11-11T19:26:03+05:30
New upstream version 2.1.6+dfsg
- - - - -
4 changed files:
- CHANGES.txt
- plip/basic/config.py
- plip/exchange/webservices.py
- plip/test/test_command_line.py
Changes:
=====================================
CHANGES.txt
=====================================
@@ -1,5 +1,8 @@
Changelog
---------
+# 2.1.6
+* fetch URL for PDB files updated to avoid issues with RCSB API changes
+
# 2.1.5
* option added to handle specific model in NMR structures
* fixes a bug in alt-location handling
=====================================
plip/basic/config.py
=====================================
@@ -1,4 +1,4 @@
-__version__ = '2.1.5'
+__version__ = '2.1.6'
__maintainer__ = 'PharmAI GmbH (2020) - www.pharm.ai - hello at pharm.ai'
import logging
=====================================
plip/exchange/webservices.py
=====================================
@@ -27,7 +27,7 @@ def check_pdb_status(pdbid):
def fetch_pdb(pdbid):
"""Get the newest entry from the RCSB server for the given PDB ID. Exits with '1' if PDB ID is invalid."""
pdbid = pdbid.lower()
- logger.info(f'checking status of PDB-ID {pdbid}')
+ # logger.info(f'checking status of PDB-ID {pdbid}')
# @todo re-implement state check with ew RCSB API, see https://www.rcsb.org/news?year=2020&article=5eb18ccfd62245129947212a&feature=true
# state, current_entry = check_pdb_status(pdbid) # Get state and current PDB ID
#
@@ -41,7 +41,7 @@ def fetch_pdb(pdbid):
logger.info('downloading file from PDB')
# get URL for current entry
# @todo needs update to react properly on response codes of RCSB servers
- pdburl = f'http://www.rcsb.org/pdb/files/{pdbid}.pdb'
+ pdburl = f'https://files.rcsb.org/download/{pdbid}.pdb'
try:
pdbfile = urlopen(pdburl).read().decode()
# If no PDB file is available, a text is now shown with "We're sorry, but ..."
=====================================
plip/test/test_command_line.py
=====================================
@@ -40,6 +40,11 @@ class CommandLineTest(unittest.TestCase):
exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -i 4v59 -o {self.tmp_dir.name}', shell=True)
self.assertEqual(exitcode, 1)
+ def test_pdb_format_available(self):
+ """A valid PDB ID is provided, but there is no entry in PDB format from wwPDB"""
+ exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -i 1acj -o {self.tmp_dir.name}', shell=True)
+ self.assertEqual(exitcode, 0)
+
def test_valid_pdb(self):
"""A PDB ID with no valid PDB record is provided."""
exitcode = subprocess.call(f'{sys.executable} ../plipcmd.py -x -f ./pdb/1eve.pdb -o {self.tmp_dir.name}',
View it on GitLab: https://salsa.debian.org/med-team/plip/-/commit/a768dc00c77828ada9d16c06147786c880369d93
--
View it on GitLab: https://salsa.debian.org/med-team/plip/-/commit/a768dc00c77828ada9d16c06147786c880369d93
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/20201111/f4d17245/attachment-0001.html>
More information about the debian-med-commit
mailing list