mailr8820 - in /branches/relax_disp: dep_check.py relax specific_fns/relax_disp.py specific_fns/relax_fit.py


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

Header


Content

Posted by sebastien . morin . 1 on February 17, 2009 - 20:15:
Author: semor
Date: Tue Feb 17 20:15:44 2009
New Revision: 8820

URL: http://svn.gna.org/viewcvs/relax?rev=8820&view=rev
Log:
Modified the dependency check so both relaxation curve fitting and dispersion 
are checked.

The name of the functions were also changed to more generic.

This follows a post at:
https://mail.gna.org/public/relax-devel/2009-02/msg00012.html
(Message-id: <7f080ed10902171018o422b7dcdjed5f6abcd94df091@xxxxxxxxxxxxxx>)


Modified:
    branches/relax_disp/dep_check.py
    branches/relax_disp/relax
    branches/relax_disp/specific_fns/relax_disp.py
    branches/relax_disp/specific_fns/relax_fit.py

Modified: branches/relax_disp/dep_check.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/dep_check.py?rev=8820&r1=8819&r2=8820&view=diff
==============================================================================
--- branches/relax_disp/dep_check.py (original)
+++ branches/relax_disp/dep_check.py Tue Feb 17 20:15:44 2009
@@ -122,7 +122,7 @@
 try:
     from maths_fns.relax_fit import setup
     del setup
-    C_module_exp_fn = True
+    C_module_fit = True
 except ImportError, message:
     # The OS.
     system = platform.system()
@@ -132,20 +132,20 @@
     if system == 'Windows' or system == 'Microsoft':
         file = 'relax_fit.pyd'
     if not access('maths_fns' + sep + file, F_OK):
-        C_module_exp_fn_mesg = "ImportError: relaxation curve fitting is 
unavailable, the corresponding C modules have not been compiled."
+        C_module_fit_mesg = "ImportError: relaxation curve fitting is 
unavailable, the corresponding C modules have not been compiled."
 
     # Show the full error.
     else:
-        C_module_exp_fn_mesg = "ImportError: " + message[0] + "\nRelaxation 
curve fitting is unavailable, try compiling the C modules."
+        C_module_fit_mesg = "ImportError: " + message[0] + "\nRelaxation 
curve fitting is unavailable, try compiling the C modules."
 
     # Set the flag.
-    C_module_exp_fn = False
+    C_module_fit = False
 
 # Relaxation dispersion.
 try:
     from maths_fns.relax_disp import setup
     del setup
-    C_module_exp_fn = True
+    C_module_disp = True
 except ImportError, message:
     # The OS.
     system = platform.system()
@@ -155,11 +155,11 @@
     if system == 'Windows' or system == 'Microsoft':
         file = 'relax_disp.pyd'
     if not access('maths_fns' + sep + file, F_OK):
-        C_module_exp_fn_mesg = "ImportError: relaxation dispersion is 
unavailable, the corresponding C modules have not been compiled."
+        C_module_disp_mesg = "ImportError: relaxation dispersion is 
unavailable, the corresponding C modules have not been compiled."
 
     # Show the full error.
     else:
-        C_module_exp_fn_mesg = "ImportError: " + message[0] + "\nRelaxation 
dispersion is unavailable, try compiling the C modules."
+        C_module_disp_mesg = "ImportError: " + message[0] + "\nRelaxation 
dispersion is unavailable, try compiling the C modules."
 
     # Set the flag.
-    C_module_exp_fn = False
+    C_module_disp = False

Modified: branches/relax_disp/relax
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/relax?rev=8820&r1=8819&r2=8820&view=diff
==============================================================================
--- branches/relax_disp/relax (original)
+++ branches/relax_disp/relax Tue Feb 17 20:15:44 2009
@@ -350,8 +350,10 @@
             intro_string = intro_string + "can be accessed by typing 
'help'.\n"
 
         # ImportErrors, if any.
-        if not dep_check.C_module_exp_fn:
-            intro_string = intro_string + "\n" + 
dep_check.C_module_exp_fn_mesg + "\n"
+        if not dep_check.C_module_fit:
+            intro_string = intro_string + "\n" + dep_check.C_module_fit_mesg 
+ "\n"
+        if not dep_check.C_module_disp:
+            intro_string = intro_string + "\n" + 
dep_check.C_module_disp_mesg + "\n"
 
         # Return the string.
         return intro_string

Modified: branches/relax_disp/specific_fns/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/relax_disp.py?rev=8820&r1=8819&r2=8820&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/relax_disp.py (original)
+++ branches/relax_disp/specific_fns/relax_disp.py Tue Feb 17 20:15:44 2009
@@ -30,7 +30,7 @@
 from re import match, search
 
 # relax module imports.
-from dep_check import C_module_exp_fn
+from dep_check import C_module_disp
 from base_class import Common_functions
 from generic_fns import pipes
 from generic_fns.mol_res_spin import exists_mol_res_spin_data, 
generate_spin_id, return_spin, spin_loop
@@ -38,7 +38,7 @@
 from relax_errors import RelaxError, RelaxFuncSetupError, RelaxLenError, 
RelaxNoModelError, RelaxNoSequenceError
 
 # C modules.
-if C_module_exp_fn:
+if C_module_disp:
     from maths_fns.relax_disp import setup, func, dfunc, d2func, back_calc_I
 
 

Modified: branches/relax_disp/specific_fns/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_fns/relax_fit.py?rev=8820&r1=8819&r2=8820&view=diff
==============================================================================
--- branches/relax_disp/specific_fns/relax_fit.py (original)
+++ branches/relax_disp/specific_fns/relax_fit.py Tue Feb 17 20:15:44 2009
@@ -29,7 +29,7 @@
 from re import match, search
 
 # relax module imports.
-from dep_check import C_module_exp_fn
+from dep_check import C_module_fit
 from base_class import Common_functions
 from generic_fns import pipes
 from generic_fns.mol_res_spin import exists_mol_res_spin_data, 
generate_spin_id, return_spin, spin_loop
@@ -37,7 +37,7 @@
 from relax_errors import RelaxError, RelaxFuncSetupError, RelaxLenError, 
RelaxNoModelError, RelaxNoSequenceError
 
 # C modules.
-if C_module_exp_fn:
+if C_module_fit:
     from maths_fns.relax_fit import setup, func, dfunc, d2func, back_calc_I
 
 




Related Messages


Powered by MHonArc, Updated Tue Feb 17 23:00:04 2009