mailr19253 - in /branches/relax_disp: specific_analyses/ test_suite/system_tests/ test_suite/system_tests/scripts/ test_suite/un...


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

Header


Content

Posted by edward on March 27, 2013 - 15:53:
Author: bugman
Date: Wed Mar 27 15:53:01 2013
New Revision: 19253

URL: http://svn.gna.org/viewcvs/relax?rev=19253&view=rev
Log:
Ported r11698 from the old relax_disp branch into the new branch.

The commands used were:
svn merge -r11697:11698 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp/specific_fns/@r18123
 specific_analyses
svn merge -r11697:11698 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp/test_suite/@r18123 
test_suite

.....
  r11698 | bugman | 2010-11-23 14:02:38 +0100 (Tue, 23 Nov 2010) | 6 lines
  Changed paths:
     M /branches/relax_disp/dep_check.py
     M /branches/relax_disp/prompt/relax_disp.py
     M /branches/relax_disp/specific_fns/relax_disp.py
     M /branches/relax_disp/specific_fns/relax_fit.py
     M /branches/relax_disp/test_suite/system_tests/relax_disp.py
     M 
/branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py
     M 
/branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py
     M /branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py
  
  Brought the relaxation dispersion branch into sync with the 1.3 line.
  
  There were many design changes within the 1.3 line that required that the 
old relaxation dispersion
  code be updated.
.....


Modified:
    branches/relax_disp/specific_analyses/relax_disp.py
    branches/relax_disp/test_suite/system_tests/relax_disp.py
    
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py
    
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py
    branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py

Modified: branches/relax_disp/specific_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp.py?rev=19253&r1=19252&r2=19253&view=diff
==============================================================================
--- branches/relax_disp/specific_analyses/relax_disp.py (original)
+++ branches/relax_disp/specific_analyses/relax_disp.py Wed Mar 27 15:53:01 
2013
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2004-2008 Edward d'Auvergne                                  
 #
+# Copyright (C) 2004-2010 Edward d'Auvergne                                  
 #
 # Copyright (C) 2009 Sebastien Morin                                         
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
@@ -31,7 +31,8 @@
 
 # relax module imports.
 from dep_check import C_module_exp_fn
-from base_class import Common_functions
+from api_base import API_base
+from api_common import API_common
 from generic_fns import pipes
 from generic_fns.mol_res_spin import exists_mol_res_spin_data, 
generate_spin_id, return_spin, spin_loop
 from minfx.generic import generic_minimise
@@ -42,7 +43,7 @@
     from maths_fns.relax_disp import setup, func, dfunc, d2func, back_calc_I
 
 
-class Relax_disp(Common_functions):
+class Relax_disp(API_base, API_common):
     """Class containing functions for relaxation dispersion curve fitting."""
 
     def assemble_param_vector(self, spin=None, sim_index=None):

Modified: branches/relax_disp/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/relax_disp.py?rev=19253&r1=19252&r2=19253&view=diff
==============================================================================
--- branches/relax_disp/test_suite/system_tests/relax_disp.py (original)
+++ branches/relax_disp/test_suite/system_tests/relax_disp.py Wed Mar 27 
15:53:01 2013
@@ -22,27 +22,24 @@
 
###############################################################################
 
 # Python module imports.
+import __main__
 from os import sep
 from shutil import rmtree
-from string import split
-import sys
 from tempfile import mkdtemp
-from unittest import TestCase
 
 # relax module imports.
+from base_classes import SystemTestCase
 from data import Relax_data_store; ds = Relax_data_store()
-from generic_fns.mol_res_spin import spin_index_loop
-from generic_fns import pipes
 
 
-class Relax_disp(TestCase):
+class Relax_disp(SystemTestCase):
     """Class for testing various aspects specific to relaxation dispersion 
curve-fitting."""
 
     def setUp(self):
         """Set up for all the functional tests."""
 
         # Create the data pipe.
-        self.relax.interpreter._Pipe.create('relax_disp', 'relax_disp')
+        self.interpreter.pipe.create('relax_disp', 'relax_disp')
 
         # Create a temporary directory for dumping files.
         ds.tmpdir = mkdtemp()
@@ -64,7 +61,7 @@
         fast-exchange limit."""
 
         # Execute the script.
-        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py')
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp_cpmg_fast.py')
 
 
     def test_curve_fitting_cpmg_slow(self):
@@ -72,22 +69,19 @@
         slow-exchange limit."""
 
         # Execute the script.
-        self.relax.interpreter.run(script_file=sys.path[-1] + 
'/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py')
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp_cpmg_slow.py')
 
 
     def test_read_r2eff(self):
         """Test the reading of a file containing r2eff values."""
 
-        # Get the current data pipe.
-        cdp = pipes.get_pipe()
-
         # Create the sequence data, and name the spins.
-        self.relax.interpreter._Residue.create(1, 'Gly')
-        self.relax.interpreter._Residue.create(2, 'Gly')
-        self.relax.interpreter._Residue.create(3, 'Gly')
+        self.interpreter.residue.create(1, 'Gly')
+        self.interpreter.residue.create(2, 'Gly')
+        self.interpreter.residue.create(3, 'Gly')
 
         # Read the file.
-        self.relax.interpreter._Relax_data.read('R2eff', '600', 600 * 1e6, 
'r2eff.out', dir=sys.path[-1] + 
"/test_suite/shared_data/curve_fitting_disp/r2eff")
+        self.interpreter.relax_data.read('R2eff', '600', 600 * 1e6, 
'r2eff.out', dir=__main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting_disp'+sep+'r2eff')
 
         # Test the data.
 

Modified: 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py?rev=19253&r1=19252&r2=19253&view=diff
==============================================================================
--- 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py 
(original)
+++ 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_fast.py 
Wed Mar 27 15:53:01 2013
@@ -1,17 +1,19 @@
 # Script for CPMG relaxation dispersion curve fitting in the fast-exchange 
limit.
 
-import sys
+# Python module imports.
+import __main__
+from os import sep
 
 
 # Create the data pipe.
 pipe.create('rex', 'relax_disp')
 
 # The path to the data files.
-data_path_1 = sys.path[-1] + 
'/test_suite/shared_data/curve_fitting_disp/Hansen/500_MHz'
-data_path_2 = sys.path[-1] + 
'/test_suite/shared_data/curve_fitting_disp/Hansen/800_MHz'
+data_path1 = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting_disp'+sep+'Hansen'+sep+'500_MHz'
+data_path2 = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting_disp'+sep+'Hansen'+sep+'800_MHz'
 
 # Load the sequence.
-sequence.read('fake_sequence.in', dir=sys.path[-1] + 
'/test_suite/shared_data/curve_fitting_disp/Hansen')
+sequence.read('fake_sequence.in', dir=__main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting_disp'+sep+'Hansen', 
res_num_col=1, res_name_col=2)
 
 # Name the spins so they can be matched to the assignments.
 spin.name(name='N')

Modified: 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py?rev=19253&r1=19252&r2=19253&view=diff
==============================================================================
--- 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py 
(original)
+++ 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp_cpmg_slow.py 
Wed Mar 27 15:53:01 2013
@@ -1,16 +1,18 @@
 # Script for CPMG relaxation dispersion curve fitting in the slow-exchange 
limit.
 
-import sys
+# Python module imports.
+import __main__
+from os import sep
 
 
 # Create the data pipe.
 pipe.create('rex', 'relax_disp')
 
 # The path to the data files.
-data_path = sys.path[-1] + 
'/test_suite/shared_data/curve_fitting_disp/Hansen/500_MHz'
+data_path = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting_disp'+sep+'Hansen'+sep+'500_MHz'
 
 # Load the sequence.
-sequence.read('fake_sequence.in', dir=sys.path[-1] + 
'/test_suite/shared_data/curve_fitting_disp/Hansen')
+sequence.read('fake_sequence.in', dir=__main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting_disp'+sep+'Hansen', 
res_num_col=1, res_name_col=2)
 
 # Name the spins so they can be matched to the assignments.
 spin.name(name='N')

Modified: branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py?rev=19253&r1=19252&r2=19253&view=diff
==============================================================================
--- branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py 
(original)
+++ branches/relax_disp/test_suite/unit_tests/_prompt/test_relax_disp.py Wed 
Mar 27 15:53:01 2013
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2008 Edward d'Auvergne                                       
 #
+# Copyright (C) 2008-2010 Edward d'Auvergne                                  
 #
 # Copyright (C) 2009 Sebastien Morin                                         
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
@@ -30,14 +30,13 @@
 
 # Unit test imports.
 from data_types import DATA_TYPES
-import fake_relax
 
 
 class Test_relax_disp(TestCase):
     """Unit tests for the functions of the 'prompt.relax_disp' module."""
 
     # Instantiate the user function class.
-    relax_disp_fns = Relax_disp(fake_relax.fake_instance())
+    relax_disp_fns = Relax_disp()
 
 
     def test_relax_calc_r2eff_argfail_exp_type(self):




Related Messages


Powered by MHonArc, Updated Wed Mar 27 16:00:02 2013