Hi Michael, Again I have highlighted a few points to address below. On 27 July 2010 03:54, <michael.bieri@xxxxxxxxxxxxx> wrote:
Author: michaelbieri Date: Tue Jul 27 03:54:02 2010 New Revision: 11349 URL: http://svn.gna.org/viewcvs/relax?rev=11349&view=rev Log: Directory for saving files can be specified. Default is None. Grace files will be saved in subdirectory 'grace'. Modified: branches/bieri_gui/auto_analyses/relax_fit.py Modified: branches/bieri_gui/auto_analyses/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/auto_analyses/relax_fit.py?rev=11349&r1=11348&r2=11349&view=diff ============================================================================== --- branches/bieri_gui/auto_analyses/relax_fit.py (original) +++ branches/bieri_gui/auto_analyses/relax_fit.py Tue Jul 27 03:54:02 2010 @@ -29,13 +29,15 @@ class Relax_fit: - def __init__(self, filename='rx', pipe_name='rx', seq_args=None, file_names=None, relax_times=None, pdb_file=None, view_plots=True, int_method='height', mc_num=500): + def __init__(self, filename='rx', pipe_name='rx', results_directory = None, seq_args=None, file_names=None, relax_times=None, pdb_file=None, view_plots=True, int_method='height', mc_num=500):
Here there should be no space around the '=' character in 'results_directory = None'.
"""Perform relaxation curve fitting. @keyword filename: Name of the output file. @type filename: str @keyword pipe_name: The name of the data pipe to create. @type pipe_name: str + @keyword directory: The directory, where results files are saved. + @type directory: str
This is a documentation bug, as the argument is called results_directory.
@keyword seq_args: The sequence data (file name, dir, mol_name_col, res_num_col, res_name_col, spin_num_col, spin_name_col, sep). These are the arguments to the sequence.read() user function, for more information please see the documentation for that function. @type seq_args: list of lists of [str, None or str, None or int, None or int, None or int, None or int, None or int, None or int, None or int, None or str] @keyword file_names: A list of all the peak list file names. @@ -55,6 +57,11 @@ # Store the args. self.filename = filename self.pipe_name = pipe_name + self.results_directory = results_directory + if results_directory: + self.grace_dir = results_directory+sep+'grace' + else: + self.grace_dir = None
I would suggest passing in the 'grace_dir' argument, which could default to "grace_dir='grace'". Having the directory 'grace' when the results_directory is given but not when that arg is None is inconsistent. In any case, the behaviour should be described in the docstring so someone using the code will get what the expect. Cheers, Edward