[med-svn] [Git][med-team/peptidebuilder][master] 3 commits: Update d/u/metadata

Nilesh Patra gitlab at salsa.debian.org
Sun Nov 29 06:39:04 GMT 2020



Nilesh Patra pushed to branch master at Debian Med / peptidebuilder


Commits:
16a6a0d1 by Nilesh Patra at 2020-11-29T10:29:13+05:30
Update d/u/metadata

- - - - -
36340d29 by Nilesh Patra at 2020-11-29T06:02:02+00:00
Replace pathlib with os in examples/evaluation.py

- - - - -
a6cf87e4 by Nilesh Patra at 2020-11-29T12:08:50+05:30
Add autopkgtests

- - - - -


5 changed files:

- + debian/patches/fix-paths-with-os.patch
- + debian/patches/series
- + debian/tests/control
- + debian/tests/run-unit-test
- debian/upstream/metadata


Changes:

=====================================
debian/patches/fix-paths-with-os.patch
=====================================
@@ -0,0 +1,66 @@
+Description: Avoid using POSIX path
+Author: Nilesh Patra <npatra974 at gmail.com>
+Forwarded: https://github.com/clauswilke/PeptideBuilder/pull/43
+Last-Update: 2020-11-29
+--- a/examples/evaluation.py
++++ b/examples/evaluation.py
+@@ -1,4 +1,4 @@
+-from pathlib import Path
++import os
+ import math
+ 
+ from Bio.PDB import PDBIO
+@@ -38,7 +38,7 @@
+ 
+ def build_linear_model(pdb_filename):
+     parser = PDBParser()
+-    structure = parser.get_structure("sample", Path(PDBdir, pdb_filename))
++    structure = parser.get_structure("sample", os.path.join(PDBdir, pdb_filename))
+     model = structure[0]
+     chain = model["A"]
+     model_structure_geo = []
+@@ -58,13 +58,13 @@
+ def make_pdb_file(struct, file_nom):
+     outfile = PDBIO()
+     outfile.set_structure(struct)
+-    outfile.save(Path(PDBdir, file_nom))
++    outfile.save(os.path.join(PDBdir, file_nom))
+     return file_nom
+ 
+ 
+ def build_backbone_model(pdb_filename):
+     parser = PDBParser()
+-    structure = parser.get_structure("sample", Path(PDBdir, pdb_filename))
++    structure = parser.get_structure("sample", os.path.join(PDBdir, pdb_filename))
+     model = structure[0]
+     chain = model["A"]
+     model_structure_geo = []
+@@ -134,7 +134,7 @@
+ 
+ def build_all_angles_model(pdb_filename):
+     parser = PDBParser()
+-    structure = parser.get_structure("sample", Path(PDBdir, pdb_filename))
++    structure = parser.get_structure("sample", os.path.join(PDBdir, pdb_filename))
+     model = structure[0]
+     chain = model["A"]
+     model_structure_geo = []
+@@ -192,7 +192,7 @@
+ 
+ def build_phi_psi_model(pdb_filename):
+     parser = PDBParser()
+-    structure = parser.get_structure("sample", Path(PDBdir, pdb_filename))
++    structure = parser.get_structure("sample", os.path.join(PDBdir, pdb_filename))
+     model = structure[0]
+     chain = model["A"]
+     seq = ""
+@@ -244,8 +244,8 @@
+ def compare_structure(reference, alternate):
+     parser = PDBParser()
+ 
+-    ref_struct = parser.get_structure("Reference", Path(PDBdir, reference))
+-    alt_struct = parser.get_structure("Alternate", Path(PDBdir, alternate))
++    ref_struct = parser.get_structure("Reference", os.path.join(PDBdir, reference))
++    alt_struct = parser.get_structure("Alternate", os.path.join(PDBdir, alternate))
+ 
+     ref_model = ref_struct[0]
+     ref_chain = ref_model["A"]


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+fix-paths-with-os.patch


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


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,39 @@
+#!/bin/bash
+set -e
+
+pkg="peptidebuilder"
+CUR_DIR=`pwd`
+
+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 ${CUR_DIR}/examples/* $AUTOPKGTEST_TMP
+cd $AUTOPKGTEST_TMP
+mv -f reconstructed_RMSDs.txt test.txt
+
+echo "Test 1"
+cd $AUTOPKGTEST_TMP
+python3 simpleExample.py
+[ -s example.pdb ] || exit 1 
+cat example.pdb
+echo "PASS"
+
+echo "Test 2"
+python3 evaluation.py 2>/dev/null
+for f in PDBs/Aligned*.pdb PDBs/AllAngles*.pdb PDBs/Backbone*.pdb PDBs/PhiPsi*.pdb
+do
+	echo $f
+	[ -s $f ] || exit 1
+	rm -f $f
+done
+
+# The diff might not work as ecpected on architectures other than amd64
+if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "amd64" ]
+then
+	echo "diff expected and generated"
+	diff -u reconstructed_RMSDs.txt test.txt
+fi
+[ -s reconstructed_RMSDs.txt ] || exit 1
+echo "PASS"


=====================================
debian/upstream/metadata
=====================================
@@ -1,3 +1,10 @@
+---
+Archive: GitHub
+Bug-Database: https://github.com/clauswilke/PeptideBuilder/issues
+Bug-Submit: https://github.com/clauswilke/PeptideBuilder/issues/new
+Changelog: https://github.com/clauswilke/PeptideBuilder/tags
+Repository: https://github.com/clauswilke/PeptideBuilder.git
+Repository-Browse: https://github.com/clauswilke/PeptideBuilder
 Reference:
  - Author: >
     Matthew Z. Tien and Dariya K. Sydykova and Austin G. Meyer and



View it on GitLab: https://salsa.debian.org/med-team/peptidebuilder/-/compare/5b0ac798bc6a0d20c800a11d3488393d1ea7761c...a6cf87e4a9a1a12e61e5fbb8d4f5ac6450833fb2

-- 
View it on GitLab: https://salsa.debian.org/med-team/peptidebuilder/-/compare/5b0ac798bc6a0d20c800a11d3488393d1ea7761c...a6cf87e4a9a1a12e61e5fbb8d4f5ac6450833fb2
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/20201129/14e82de0/attachment-0001.html>


More information about the debian-med-commit mailing list