mailr16374 - /branches/uf_redesign/test_suite/system_tests/scripts/bmrb_rw.py


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

Header


Content

Posted by edward on May 22, 2012 - 12:27:
Author: bugman
Date: Tue May 22 12:27:15 2012
New Revision: 16374

URL: http://svn.gna.org/viewcvs/relax?rev=16374&view=rev
Log:
Converted the bmrb_rw.py system test script to use the new prompt 
self._execute_uf() method.

The GUI test framework will need slight modification to use this script 
directly still.


Modified:
    branches/uf_redesign/test_suite/system_tests/scripts/bmrb_rw.py

Modified: branches/uf_redesign/test_suite/system_tests/scripts/bmrb_rw.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/test_suite/system_tests/scripts/bmrb_rw.py?rev=16374&r1=16373&r2=16374&view=diff
==============================================================================
--- branches/uf_redesign/test_suite/system_tests/scripts/bmrb_rw.py (original)
+++ branches/uf_redesign/test_suite/system_tests/scripts/bmrb_rw.py Tue May 
22 12:27:15 2012
@@ -8,8 +8,6 @@
 from status import Status; status = Status()
 
 
-system_test_asdfsda
-
 # Missing temp file (allow this script to run outside of the system test 
framework).
 state_file = 'devnull'
 if not hasattr(ds, 'tmpfile'):
@@ -19,50 +17,51 @@
     state_file = 'temp_bmrb_state'
 
 # Create the data pipe.
-pipe.create(pipe_name='results', pipe_type='mf')
+self._execute_uf(uf_name='pipe.create', pipe_name='results', pipe_type='mf')
 
 # Read the results.
-results.read(file='final_results_trunc_1.3', dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP')
+self._execute_uf(uf_name='results.read', file='final_results_trunc_1.3', 
dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP')
 
 # Play with the data.
-deselect.all()
-spin.copy(spin_from=':9', spin_to=':9@NE')
-select.spin(':9')
-select.spin(':10')
-select.spin(':11')
-spin.name(name='N')
-spin.element(element='N')
-molecule.name(name='OMP')
-molecule.type(type='protein')
-bmrb.thiol_state(state='reduced')
+self._execute_uf(uf_name='deselect.all')
+self._execute_uf(uf_name='spin.copy', spin_from=':9', spin_to=':9@NE')
+self._execute_uf(uf_name='select.spin', spin_id=':9')
+self._execute_uf(uf_name='select.spin', spin_id=':10')
+self._execute_uf(uf_name='select.spin', spin_id=':11')
+self._execute_uf(uf_name='spin.name', name='N')
+self._execute_uf(uf_name='spin.element', element='N')
+self._execute_uf(uf_name='molecule.name', name='OMP')
+self._execute_uf(uf_name='molecule.type', type='protein')
+self._execute_uf(uf_name='bmrb.thiol_state', state='reduced')
 
 # Display the data (as a test).
-relax_data.display(ri_id='R1_800')
+self._execute_uf(uf_name='relax_data.display', ri_id='R1_800')
 
 # Temperature control and peak intensity type.
 ri_ids = ['R1_600', 'R2_600', 'NOE_600', 'R1_800', 'R2_800', 'NOE_800']
 for i in range(6):
-    relax_data.temp_calibration(ri_id=ri_ids[i], method='methanol')
-    relax_data.temp_control(ri_id=ri_ids[i], method='single fid 
interleaving')
-    relax_data.peak_intensity_type(ri_id=ri_ids[i], type='height')
+    self._execute_uf(uf_name='relax_data.temp_calibration', ri_id=ri_ids[i], 
method='methanol')
+    self._execute_uf(uf_name='relax_data.temp_control', ri_id=ri_ids[i], 
method='single fid interleaving')
+    self._execute_uf(uf_name='relax_data.peak_intensity_type', 
ri_id=ri_ids[i], type='height')
 
 # Set up some BMRB information.
-bmrb.software_select('NMRPipe')
-bmrb.software_select('Sparky', version='3.106')
-bmrb.citation(cite_id='test', authors=[["Edward", "d'Auvergne", "E.", "J."], 
["Paul", "Gooley", "P.", "R."]], doi="10.1039/b702202f", 
pubmed_id="17579774", full_citation="d'Auvergne E. J., Gooley P. R. (2007). 
Set theory formulation of the model-free problem and the diffusion seeded 
model-free paradigm. Mol. Biosyst., 3(7), 483-494.", title="Set theory 
formulation of the model-free problem and the diffusion seeded model-free 
paradigm.", status="published", type="journal", journal_abbrev="Mol. 
Biosyst.", journal_full="Molecular Biosystems", volume=3, issue=7, 
page_first=483, page_last=498, year=2007)
-bmrb.software(name='X', url='http://www.nmr-relax.com', vendor_name='me', 
cite_ids=['test'], tasks=['procrastinating', 'nothing much', 'wasting time'])
-bmrb.script(file='noe.py', dir=status.install_path+sep+'sample_scripts', 
analysis_type='noe', engine='relax')
-bmrb.script(file='relax_fit.py', 
dir=status.install_path+sep+'sample_scripts', analysis_type='relax_fit', 
engine='relax')
-bmrb.script(file='dauvergne_protocol.py', 
dir=status.install_path+sep+'sample_scripts'+sep+'model_free', 
analysis_type='mf', model_selection='AIC', engine='relax', model_elim=True, 
universal_solution=True)
+self._execute_uf(uf_name='bmrb.software_select', name='NMRPipe')
+self._execute_uf(uf_name='bmrb.software_select', name='Sparky', 
version='3.106')
+
+self._execute_uf(uf_name='bmrb.citation', cite_id='test', 
authors=[["Edward", "d'Auvergne", "E.", "J."], ["Paul", "Gooley", "P.", 
"R."]], doi="10.1039/b702202f", pubmed_id="17579774", 
full_citation="d'Auvergne E. J., Gooley P. R. (2007). Set theory formulation 
of the model-free problem and the diffusion seeded model-free paradigm. Mol. 
Biosyst., 3(7), 483-494.", title="Set theory formulation of the model-free 
problem and the diffusion seeded model-free paradigm.", status="published", 
type="journal", journal_abbrev="Mol. Biosyst.", journal_full="Molecular 
Biosystems", volume=3, issue=7, page_first=483, page_last=498, year=2007)
+self._execute_uf(uf_name='bmrb.software', name='X', 
url='http://www.nmr-relax.com', vendor_name='me', cite_ids=['test'], 
tasks=['procrastinating', 'nothing much', 'wasting time'])
+self._execute_uf(uf_name='bmrb.script', file='noe.py', 
dir=status.install_path+sep+'sample_scripts', analysis_type='noe', 
engine='relax')
+self._execute_uf(uf_name='bmrb.script', file='relax_fit.py', 
dir=status.install_path+sep+'sample_scripts', analysis_type='relax_fit', 
engine='relax')
+self._execute_uf(uf_name='bmrb.script', file='dauvergne_protocol.py', 
dir=status.install_path+sep+'sample_scripts'+sep+'model_free', 
analysis_type='mf', model_selection='AIC', engine='relax', model_elim=True, 
universal_solution=True)
 
 # Write, then read the data to a new data pipe.
-bmrb.write(file=ds.tmpfile, dir=None, version=ds.version, force=True)
-pipe.create(pipe_name='new', pipe_type='mf')
-bmrb.read(file=ds.tmpfile, version=ds.version)
+self._execute_uf(uf_name='bmrb.write', file=ds.tmpfile, dir=None, 
version=ds.version, force=True)
+self._execute_uf(uf_name='pipe.create', pipe_name='new', pipe_type='mf')
+self._execute_uf(uf_name='bmrb.read', file=ds.tmpfile, version=ds.version)
 
 # Display tests.
-sequence.display()
-relax_data.display(ri_id='R1_800')
+self._execute_uf(uf_name='sequence.display')
+self._execute_uf(uf_name='relax_data.display', ri_id='R1_800')
 
 # Save the program state.
-state.save(state_file, force=True)
+self._execute_uf(uf_name='state.save', state=state_file, force=True)




Related Messages


Powered by MHonArc, Updated Tue May 22 12:40:02 2012