mailr24386 - in /trunk: lib/structure/internal/object.py version.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 02, 2014 - 09:06:
Author: bugman
Date: Wed Jul  2 09:06:16 2014
New Revision: 24386

URL: http://svn.gna.org/viewcvs/relax?rev=24386&view=rev
Log:
Fix for the software verification tests.

The recent expansion and improvements of the REMARK records created by the 
internal structural
object PDB writing method imported the relax version to place this 
information into the PDB files.
However this breaks the relax library design, as shown by the verification 
tests.  Instead the relax
version information is being taken from the 
lib.structure.internal.object.RELAX_VERSION variable.
This defaults to None, however the version module now sets this variable 
directly when it is
imported so that it is always set to the current relax version when running 
relax.


Modified:
    trunk/lib/structure/internal/object.py
    trunk/version.py

Modified: trunk/lib/structure/internal/object.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/object.py?rev=24386&r1=24385&r2=24386&view=diff
==============================================================================
--- trunk/lib/structure/internal/object.py      (original)
+++ trunk/lib/structure/internal/object.py      Wed Jul  2 09:06:16 2014
@@ -44,11 +44,11 @@
 from lib.structure.internal.molecules import MolContainer
 from lib.warnings import RelaxWarning
 from lib.xml import object_to_xml, xml_to_object
-from version import version_full
 
 
 # Module variables.
 CHAIN_ID_LIST = 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'
+RELAX_VERSION = None
 
 
 class Internal:
@@ -2459,7 +2459,8 @@
         pdb_write.remark(file, num=40, remark=None)
         pdb_write.remark(file, num=40, remark="Created using relax 
(http://www.nmr-relax.com).")
         pdb_write.remark(file, num=40, remark=None)
-        pdb_write.remark(file, num=40, remark="relax version %s." % 
version_full())
+        if RELAX_VERSION:
+            pdb_write.remark(file, num=40, remark="relax version %s." % 
RELAX_VERSION)
         pdb_write.remark(file, num=40, remark="Created on %s." % asctime())
         num_remark = 2
 

Modified: trunk/version.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/version.py?rev=24386&r1=24385&r2=24386&view=diff
==============================================================================
--- trunk/version.py    (original)
+++ trunk/version.py    Wed Jul  2 09:06:16 2014
@@ -33,6 +33,7 @@
     from subprocess import PIPE, Popen
 
 # relax module imports.
+import lib.structure.internal.object
 from status import Status; status = Status()
 
 
@@ -116,3 +117,6 @@
 
 # Fetch the repository information, if present.
 repo_information()
+
+# Set the version in the relax internal structural object.
+lib.structure.internal.object.RELAX_VERSION = version_full()




Related Messages


Powered by MHonArc, Updated Wed Jul 02 09:40:05 2014