mailr23261 - in /branches/disp_speed: ./ multi/ test_suite/gui_tests/ test_suite/system_tests/scripts/model_free/


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

Header


Content

Posted by tlinnet on May 20, 2014 - 17:40:
Author: tlinnet
Date: Tue May 20 17:40:12 2014
New Revision: 23261

URL: http://svn.gna.org/viewcvs/relax?rev=23261&view=rev
Log:
Merged revisions 23254,23260 via svnmerge from 
svn+ssh://tlinnet@xxxxxxxxxxx/svn/relax/trunk

........
  r23254 | bugman | 2014-05-20 13:37:32 +0200 (Tue, 20 May 2014) | 12 lines
  
  Fix for the chain-reaction failures in the test suite.
  
  This fixes bug #22055 (https://gna.org/bugs/?22055), the 
processor.run_queue() not cleaning up in
  uni_processor - chain-reaction failures in the test suite.
  
  The fix was insanely simple, just implementing what was mentioned Gary's 
FIXME comment in the
  run_queue() method of the uni-processor object.  The queue execution code 
has been placed inside a
  'try' statement and the queue cleaning up code in a 'finally' statement.
  
  This closes a painfully difficult to find bug that has been in relax since 
2006.
........
  r23260 | bugman | 2014-05-20 16:19:30 +0200 (Tue, 20 May 2014) | 6 lines
  
  Converted the Mf.test_opendx_s2_te_rex system test into a GUI test.
  
  This is to demonstrate bug #22035 (https://gna.org/bugs/?22035), the dx.map 
user function being
  broken in the GUI.
........

Modified:
    branches/disp_speed/   (props changed)
    branches/disp_speed/multi/uni_processor.py
    branches/disp_speed/test_suite/gui_tests/model_free.py
    
branches/disp_speed/test_suite/system_tests/scripts/model_free/opendx_s2_te_rex.py

Propchange: branches/disp_speed/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May 20 17:40:12 2014
@@ -1 +1 @@
-/trunk:1-23237
+/trunk:1-23260

Modified: branches/disp_speed/multi/uni_processor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/multi/uni_processor.py?rev=23261&r1=23260&r2=23261&view=diff
==============================================================================
--- branches/disp_speed/multi/uni_processor.py  (original)
+++ branches/disp_speed/multi/uni_processor.py  Tue May 20 17:40:12 2014
@@ -175,15 +175,18 @@
 
 
     def run_queue(self):
-        #FIXME: need a finally here to cleanup exceptions states for windows 
etc
+        """Safely run each command in the queue, cleaning up after 
failures."""
 
-        last_command = len(self.command_queue)-1
-        for i, command  in enumerate(self.command_queue):
-            completed = (i == last_command)
+        # Run each command in the queue.
+        try:
+            last_command = len(self.command_queue)-1
+            for i, command  in enumerate(self.command_queue):
+                completed = (i == last_command)
 
-            command.run(self, completed)
+                command.run(self, completed)
 
-        #self.run_command_queue()
-        #TODO: add cheques for empty queues and maps if now warn
-        del self.command_queue[:]
-        self.memo_map.clear()
+        # Clear the queue, even if a failure occurs.
+        finally:
+            #TODO: add cheques for empty queues and maps if now warn
+            del self.command_queue[:]
+            self.memo_map.clear()

Modified: branches/disp_speed/test_suite/gui_tests/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/test_suite/gui_tests/model_free.py?rev=23261&r1=23260&r2=23261&view=diff
==============================================================================
--- branches/disp_speed/test_suite/gui_tests/model_free.py      (original)
+++ branches/disp_speed/test_suite/gui_tests/model_free.py      Tue May 20 
17:40:12 2014
@@ -518,6 +518,16 @@
             self.assertAlmostEqual(interatom.r, 1.02 * 1e-10)
 
 
+    def test_opendx_s2_te_rex(self):
+        """Mapping the {S2, te, Rex} chi2 space through the OpenDX user 
function dx.map().
+
+        This is to catch U{bug #22035<https://gna.org/bugs/?22035>}, the 
dx.map user function being broken in the GUI.
+        """
+
+        # Execute the script.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'opendx_s2_te_rex.py')
+
+
 
 class Fake_right_click:
     """Simulate a grid_cell_right_click event ."""

Modified: 
branches/disp_speed/test_suite/system_tests/scripts/model_free/opendx_s2_te_rex.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_speed/test_suite/system_tests/scripts/model_free/opendx_s2_te_rex.py?rev=23261&r1=23260&r2=23261&view=diff
==============================================================================
--- 
branches/disp_speed/test_suite/system_tests/scripts/model_free/opendx_s2_te_rex.py
  (original)
+++ 
branches/disp_speed/test_suite/system_tests/scripts/model_free/opendx_s2_te_rex.py
  Tue May 20 17:40:12 2014
@@ -12,34 +12,34 @@
 path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'S2_0.970_te_2048_Rex_0.149'
 
 # Set up the 15N spins.
-sequence.read(file='noe.500.out', dir=path, res_num_col=1, res_name_col=2)
-spin.name('N')
-spin.element('N')
-spin.isotope('15N', spin_id='@N')
+self._execute_uf(uf_name='sequence.read', file='noe.500.out', dir=path, 
res_num_col=1, res_name_col=2)
+self._execute_uf(uf_name='spin.name', name='N')
+self._execute_uf(uf_name='spin.element', element='N')
+self._execute_uf(uf_name='spin.isotope', isotope='15N', spin_id='@N')
 
 # Read the relaxation data.
-relax_data.read(ri_id='R1_600',  ri_type='R1',  frq=600.0*1e6, 
file='r1.600.out', dir=path, res_num_col=1, res_name_col=2, data_col=3, 
error_col=4)
-relax_data.read(ri_id='R2_600',  ri_type='R2',  frq=600.0*1e6, 
file='r2.600.out', dir=path, res_num_col=1, res_name_col=2, data_col=3, 
error_col=4)
-relax_data.read(ri_id='NOE_600', ri_type='NOE', frq=600.0*1e6, 
file='noe.600.out', dir=path, res_num_col=1, res_name_col=2, data_col=3, 
error_col=4)
-relax_data.read(ri_id='R1_500',  ri_type='R1',  frq=500.0*1e6, 
file='r1.500.out', dir=path, res_num_col=1, res_name_col=2, data_col=3, 
error_col=4)
-relax_data.read(ri_id='R2_500',  ri_type='R2',  frq=500.0*1e6, 
file='r2.500.out', dir=path, res_num_col=1, res_name_col=2, data_col=3, 
error_col=4)
-relax_data.read(ri_id='NOE_500', ri_type='NOE', frq=500.0*1e6, 
file='noe.500.out', dir=path, res_num_col=1, res_name_col=2, data_col=3, 
error_col=4)
+self._execute_uf(uf_name='relax_data.read', ri_id='R1_600',  ri_type='R1',  
frq=600.0*1e6, file='r1.600.out', dir=path, res_num_col=1, res_name_col=2, 
data_col=3, error_col=4)
+self._execute_uf(uf_name='relax_data.read', ri_id='R2_600',  ri_type='R2',  
frq=600.0*1e6, file='r2.600.out', dir=path, res_num_col=1, res_name_col=2, 
data_col=3, error_col=4)
+self._execute_uf(uf_name='relax_data.read', ri_id='NOE_600', ri_type='NOE', 
frq=600.0*1e6, file='noe.600.out', dir=path, res_num_col=1, res_name_col=2, 
data_col=3, error_col=4)
+self._execute_uf(uf_name='relax_data.read', ri_id='R1_500',  ri_type='R1',  
frq=500.0*1e6, file='r1.500.out', dir=path, res_num_col=1, res_name_col=2, 
data_col=3, error_col=4)
+self._execute_uf(uf_name='relax_data.read', ri_id='R2_500',  ri_type='R2',  
frq=500.0*1e6, file='r2.500.out', dir=path, res_num_col=1, res_name_col=2, 
data_col=3, error_col=4)
+self._execute_uf(uf_name='relax_data.read', ri_id='NOE_500', ri_type='NOE', 
frq=500.0*1e6, file='noe.500.out', dir=path, res_num_col=1, res_name_col=2, 
data_col=3, error_col=4)
 
 # Initialise the diffusion tensor.
-diffusion_tensor.init(1e-8, fixed=True)
+self._execute_uf(uf_name='diffusion_tensor.init', params=1e-8, fixed=True)
 
 # Create all attached protons.
-sequence.attach_protons()
+self._execute_uf(uf_name='sequence.attach_protons')
 
 # Define the magnetic dipole-dipole relaxation interaction.
-interatom.define(spin_id1='@N', spin_id2='@H', direct_bond=True)
-interatom.set_dist(spin_id1='@N', spin_id2='@H', ave_dist=1.02 * 1e-10)
+self._execute_uf(uf_name='interatom.define', spin_id1='@N', spin_id2='@H', 
direct_bond=True)
+self._execute_uf(uf_name='interatom.set_dist', spin_id1='@N', spin_id2='@H', 
ave_dist=1.02 * 1e-10)
 
 # Define the CSA relaxation interaction.
-value.set(N15_CSA, 'csa')
+self._execute_uf(uf_name='value.set', val=N15_CSA, param='csa')
 
 # Select the model.
-model_free.select_model(model='m4')
+self._execute_uf(uf_name='model_free.select_model', model='m4')
 
 # Map the space.
-dx.map(params=['s2', 'te', 'rex'], spin_id=':2@N', inc=2, lower=[0.0, 0, 0], 
upper=[1.0, 10000e-12, 3.0 / (2.0 * pi * 600000000.0)**2], point=[0.970, 
2048.0e-12, 0.149 / (2.0 * pi * 600000000.0)**2], file_prefix='devnull', 
point_file='devnull')
+self._execute_uf(uf_name='dx.map', params=['s2', 'te', 'rex'], 
spin_id=':2@N', inc=2, lower=[0.0, 0, 0], upper=[1.0, 10000e-12, 3.0 / (2.0 * 
pi * 600000000.0)**2], point=[0.970, 2048.0e-12, 0.149 / (2.0 * pi * 
600000000.0)**2], file_prefix='devnull', point_file='devnull')




Related Messages


Powered by MHonArc, Updated Tue May 20 18:00:03 2014