Author: bugman
Date: Tue Nov 11 09:45:48 2014
New Revision: 26503
URL: http://svn.gna.org/viewcvs/relax?rev=26503&view=rev
Log:
Python 3 fixes - eliminated all usage of the dictionary iteritems() calls as
this no longer exists.
Modified:
trunk/auto_analyses/relax_disp_repeat_cpmg.py
trunk/auto_analyses/relax_fit.py
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/5_clustered_analyses.py
trunk/test_suite/system_tests/relax_disp.py
trunk/test_suite/system_tests/relax_fit.py
Modified: trunk/auto_analyses/relax_disp_repeat_cpmg.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp_repeat_cpmg.py?rev=26503&r1=26502&r2=26503&view=diff
==============================================================================
--- trunk/auto_analyses/relax_disp_repeat_cpmg.py (original)
+++ trunk/auto_analyses/relax_disp_repeat_cpmg.py Tue Nov 11 09:45:48 2014
@@ -78,8 +78,8 @@
self.settings = settings
# Unpack settings from dictionary to self.
- for setting, value in self.settings.iteritems():
- setattr(self, setting, value)
+ for setting in self.settings:
+ setattr(self, setting, self.settings[setting])
if 'pipe_type' not in self.settings:
self.set_self(key='pipe_type', value='relax_disp')
Modified: trunk/auto_analyses/relax_fit.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_fit.py?rev=26503&r1=26502&r2=26503&view=diff
==============================================================================
--- trunk/auto_analyses/relax_fit.py (original)
+++ trunk/auto_analyses/relax_fit.py Tue Nov 11 09:45:48 2014
@@ -205,12 +205,12 @@
has_dub = False
if not hasattr(cdp, 'replicates'):
- # Collect all times, and matching spectrum id.
+ # Collect all times, and matching spectrum ID.
all_times = []
all_id = []
- for s_id, time in cdp.relax_times.iteritems():
- all_times.append(time)
- all_id.append(s_id)
+ for spectrum_id in cdp.relax_times:
+ all_times.append(cdp.relax_times[spectrum_id])
+ all_id.append(spectrum_id)
# Get the dublicates.
dublicates = map(lambda val: (val, [i for i in
range(len(all_times)) if all_times[i] == val]), all_times)
Modified:
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/5_clustered_analyses.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/5_clustered_analyses.py?rev=26503&r1=26502&r2=26503&view=diff
==============================================================================
---
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/5_clustered_analyses.py
(original)
+++
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/5_clustered_analyses.py
Tue Nov 11 09:45:48 2014
@@ -102,8 +102,8 @@
relax_disp.cluster('model_cluster', spin_id)
# See the clustering in the current data pipe "cdp".
-for key, value in cdp.clustering.iteritems():
- print key, value
+for key in cdp.clustering:
+ print(key, cdp.clustering[key])
# Print parameter kex before copying.
for cur_spin, mol_name, resi, resn, spin_id in spin_loop(full_info=True,
return_id=True, skip_desel=True):
Modified: trunk/test_suite/system_tests/relax_disp.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=26503&r1=26502&r2=26503&view=diff
==============================================================================
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Nov 11 09:45:48 2014
@@ -6172,10 +6172,10 @@
self.assertEqual(len(par_dic), len(model_params))
# Loop over dictionary.
- for param, param_conv in par_dic.iteritems():
- if param != param_conv:
- print("Model:'%s', Nested model:'%s', Copying '%s'
to '%s'." % (model_info.model, nested_model, param_conv, param))
- self.assertNotEqual(param_conv, None)
+ for param in par_dic:
+ if param != par_dic[param]:
+ print("Model:'%s', Nested model:'%s', Copying '%s'
to '%s'." % (model_info.model, nested_model, par_dic[param], param))
+ self.assertNotEqual(par_dic[param], None)
def test_ns_mmq_3site(self):
Modified: trunk/test_suite/system_tests/relax_fit.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_fit.py?rev=26503&r1=26502&r2=26503&view=diff
==============================================================================
--- trunk/test_suite/system_tests/relax_fit.py (original)
+++ trunk/test_suite/system_tests/relax_fit.py Tue Nov 11 09:45:48 2014
@@ -296,12 +296,12 @@
else:
# Prepare for finding dublictes.
- # Collect all times, and matching spectrum id.
+ # Collect all times, and matching spectrum ID.
all_times = []
all_id = []
- for s_id, time in cdp.relax_times.iteritems():
- all_times.append(time)
- all_id.append(s_id)
+ for spectrum_id in cdp.relax_times:
+ all_times.append(cdp.relax_times[spectrum_id])
+ all_id.append(spectrum_id)
# Get the dublicates.
dublicates = map(lambda val: (val, [i for i in
range(len(all_times)) if all_times[i] == val]), all_times)
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits