Hi, Some of these patch will require a number of fixes before being applied. I will outline the issues below. On 12 April 2010 05:13, Michael Bieri <NO-REPLY.INVALID-ADDRESS@xxxxxxx> wrote:
Follow-up Comment #45, task #6847 (project relax): Patches for relax_fit.py in the 1.3 line: definition and pipename: relax_fit.py accepts additional keywords for beter cooperation with the GUI. In addition, the pipe names are supplemented with the date and time to allow multiple calculations of the same kind in the same session.
This patch is not yet applied. Firstly some formatting - the epydoc type text should be 'str' rather than 'str (directory)', etc. An empty line has been added at line 76 which should not be there. And the last one is that function argument default values should not have spaces around the = sign, i.e. 'directory = None' should be 'directory=None'. For appending the time info being appended to the pipe name, this removes flexibility from the code and is a bit counter intuitive for the API. There are 2 better solutions for this. The first is that the default is set to None, and if no argument is given then the automatic pipe name with time is created. The second is that the calling code generates the data pipe with time stamp. I see either way as being acceptable. The reasoning here is simple - if someone uses this code and asks for a the data to be located in a defined data pipe, changing the name of their special pipe (which might already contain data) would be bad. They will struggle to work out why their data pipe is empty or not modified. We should never clobber the names, data, etc. of the calling code.
-------------------------------- correct repetitions spectra (again...) Repeated spectra are set correctly and unresolved file is read correctly.
Applied! The 'again...' text suggests that a link would be useful in the commit message ;)
--------------------------- output files: Output files can get set by different interfaces. Default name is 'rx', but the GUI will set them as for example r1.600.out and r1.600.save. In addition, saved plots are only automatically displayed if chosen.
This has not yet been applied. Firstly the new view_plots flag should be in a separate patch, and it should be introduced as a method arg simultaneously so that the code will function without a second fixing patch. Secondly for the relax coding style, the dir arg should not have space around the = sign, i.e. 'dir = self.grace_dir' should be 'dir=self.grace_dir'.
----------------------- load sequence: relax_fit.py reads sequence from either a sequence file or a pdb file.
There is also a better way to perform this operation. If no PDB file is selected by the user, i.e. a sequence file is given, then the GUI should set the PDB file name to None rather than '!!! Sequence file selected !!!'. This string is not needed. The GUI can check that the user has specified one or the other. Even better would be to check if self.seq_args is None. Cheers, Edward