mailr16049 - in /branches/uf_redesign: generic_fns/bmrb.py user_functions/bmrb.py


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

Header


Content

Posted by edward on May 07, 2012 - 14:40:
Author: bugman
Date: Mon May  7 14:40:14 2012
New Revision: 16049

URL: http://svn.gna.org/viewcvs/relax?rev=16049&view=rev
Log:
Fix for the bmrb.read and bmrb.write user function backends.

The directory argument name change from dir to directory in the prompt 
interface was not compatible
with the auto-generation system.  Therefore the argument has been changed to 
'dir' everywhere.


Modified:
    branches/uf_redesign/generic_fns/bmrb.py
    branches/uf_redesign/user_functions/bmrb.py

Modified: branches/uf_redesign/generic_fns/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/bmrb.py?rev=16049&r1=16048&r2=16049&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/bmrb.py (original)
+++ branches/uf_redesign/generic_fns/bmrb.py Mon May  7 14:40:14 2012
@@ -191,13 +191,13 @@
     return N
 
 
-def read(file=None, directory=None, version=None, sample_conditions=None):
+def read(file=None, dir=None, version=None, sample_conditions=None):
     """Read the contents of a BMRB NMR-STAR formatted file.
 
     @keyword file:              The name of the BMRB STAR formatted file.
     @type file:                 str
-    @keyword directory:         The directory where the file is located.
-    @type directory:            None or str
+    @keyword dir:               The directory where the file is located.
+    @type dir:                  None or str
     @keyword version:           The BMRB version to force the reading.
     @type version:              None or str
     @keyword sample_conditions: The sample condition label to read.  Only 
one sample condition can be read per data pipe.
@@ -217,7 +217,7 @@
         raise RelaxError("The current data pipe is not empty.")
 
     # Get the full file path.
-    file_path = get_file_path(file_name=file, dir=directory)
+    file_path = get_file_path(file_name=file, dir=dir)
 
     # Fail if the file does not exist.
     if not access(file_path, F_OK):
@@ -230,7 +230,7 @@
     read_function(file_path, version=version, 
sample_conditions=sample_conditions)
 
 
-def write(file=None, directory=None, version='3.1', force=False):
+def write(file=None, dir=None, version='3.1', force=False):
     """Create a BMRB NMR-STAR formatted file."""
 
     # Test if bmrblib is installed.
@@ -242,14 +242,14 @@
         raise RelaxNoPipeError
 
     # The special data pipe name directory.
-    if directory == 'pipe_name':
-        directory = ds.current_pipe
+    if dir == 'pipe_name':
+        dir = ds.current_pipe
 
     # Specific results writing function.
     write_function = specific_fns.setup.get_specific_fn('bmrb_write', 
ds[ds.current_pipe].pipe_type)
 
     # Get the full file path.
-    file_path = get_file_path(file, directory)
+    file_path = get_file_path(file, dir)
 
     # Fail if the file already exists and the force flag is False.
     if access(file_path, F_OK) and not force:
@@ -259,7 +259,7 @@
     print("Opening the file '%s' for writing." % file_path)
 
     # Create the directories.
-    mkdir_nofail(directory, verbosity=0)
+    mkdir_nofail(dir, verbosity=0)
 
     # Get the info box.
     info = Info_box()

Modified: branches/uf_redesign/user_functions/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/bmrb.py?rev=16049&r1=16048&r2=16049&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/bmrb.py (original)
+++ branches/uf_redesign/user_functions/bmrb.py Mon May  7 14:40:14 2012
@@ -219,7 +219,7 @@
     desc = "The name of the BMRB NMR-STAR formatted file to read."
 )
 uf.add_keyarg(
-    name = "directory",
+    name = "dir",
     py_type = "str",
     arg_type = "dir",
     desc_short = "directory name",




Related Messages


Powered by MHonArc, Updated Mon May 07 15:00:02 2012