Author: bugman Date: Mon Dec 8 14:47:42 2008 New Revision: 8160 URL: http://svn.gna.org/viewcvs/relax?rev=8160&view=rev Log: Renamed the noe.read() user function to noe.read_constraints(). Modified: 1.3/prompt/noe.py 1.3/test_suite/unit_tests/_prompt/test_noe.py Modified: 1.3/prompt/noe.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/noe.py?rev=8160&r1=8159&r2=8160&view=diff ============================================================================== --- 1.3/prompt/noe.py (original) +++ 1.3/prompt/noe.py Mon Dec 8 14:47:42 2008 @@ -46,7 +46,7 @@ self.__relax__ = relax - def read(self, file=None, dir=None, proton1_col=None, proton2_col=None, lower_col=None, upper_col=None, sep=None): + def read_constraints(self, file=None, dir=None, proton1_col=None, proton2_col=None, lower_col=None, upper_col=None, sep=None): """Read NOESY or ROESY constraints from a file. Keyword Arguments @@ -81,18 +81,18 @@ To read the Xplor formatted constraint file 'NOE.xpl', type one of: - relax> noe.read('NOE.xpl') - relax> noe.read(file='NOE.xpl') + relax> noe.read_constraints('NOE.xpl') + relax> noe.read_constraints(file='NOE.xpl') To read the generic formatted file 'noes', type one of: - relax> noe.read(file='NOE.xpl', proton1_col=0, proton2_col=1, lower_col=2, upper_col=3) + relax> noe.read_constraints(file='NOE.xpl', proton1_col=0, proton2_col=1, lower_col=2, upper_col=3) """ # Function intro text. if self.__relax__.interpreter.intro: - text = sys.ps3 + "noe.read(" + text = sys.ps3 + "noe.read_constraints(" text = text + "file=" + `file` text = text + ", dir=" + `dir` text = text + ", proton1_col=" + `proton1_col` @@ -131,7 +131,7 @@ raise RelaxNoneStrError, ('column separator', sep) # Execute the functional code. - noe.read(frq=frq, file=file, dir=dir, proton1_col=proton1_col, proton2_col=proton2_col, lower_col=lower_col, upper_col=upper_col, sep=sep) + noe.read_constraints(frq=frq, file=file, dir=dir, proton1_col=proton1_col, proton2_col=proton2_col, lower_col=lower_col, upper_col=upper_col, sep=sep) def spectrum_type(self, spectrum_type=None, spectrum_id=None): Modified: 1.3/test_suite/unit_tests/_prompt/test_noe.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/_prompt/test_noe.py?rev=8160&r1=8159&r2=8160&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/_prompt/test_noe.py (original) +++ 1.3/test_suite/unit_tests/_prompt/test_noe.py Mon Dec 8 14:47:42 2008 @@ -39,8 +39,8 @@ noe_fns = Noe(fake_relax.fake_instance()) - def test_read_argfail_file(self): - """The file arg test of the noe.read() user function.""" + def test_read_constraints_argfail_file(self): + """The file arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -49,11 +49,11 @@ continue # The argument test. - self.assertRaises(RelaxStrError, self.noe_fns.read, file=data[1]) + self.assertRaises(RelaxStrError, self.noe_fns.read_constraints, file=data[1]) - def test_read_argfail_dir(self): - """The dir arg test of the noe.read() user function.""" + def test_read_constraints_argfail_dir(self): + """The dir arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -62,11 +62,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneStrError, self.noe_fns.read, file='noes', dir=data[1]) + self.assertRaises(RelaxNoneStrError, self.noe_fns.read_constraints, file='noes', dir=data[1]) - def test_read_argfail_proton1_col(self): - """The proton1_col arg test of the noe.read() user function.""" + def test_read_constraints_argfail_proton1_col(self): + """The proton1_col arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -75,11 +75,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.noe_fns.read, file='noes', proton1_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.noe_fns.read_constraints, file='noes', proton1_col=data[1]) - def test_read_argfail_proton2_col(self): - """The proton2_col arg test of the noe.read() user function.""" + def test_read_constraints_argfail_proton2_col(self): + """The proton2_col arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -88,11 +88,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.noe_fns.read, file='noes', proton2_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.noe_fns.read_constraints, file='noes', proton2_col=data[1]) - def test_read_argfail_lower_col(self): - """The lower_col arg test of the noe.read() user function.""" + def test_read_constraints_argfail_lower_col(self): + """The lower_col arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -101,11 +101,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.noe_fns.read, file='noes', lower_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.noe_fns.read_constraints, file='noes', lower_col=data[1]) - def test_read_argfail_upper_col(self): - """The upper_col arg test of the noe.read() user function.""" + def test_read_constraints_argfail_upper_col(self): + """The upper_col arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -114,11 +114,11 @@ continue # The argument test. - self.assertRaises(RelaxNoneIntError, self.noe_fns.read, file='noes', upper_col=data[1]) + self.assertRaises(RelaxNoneIntError, self.noe_fns.read_constraints, file='noes', upper_col=data[1]) - def test_read_argfail_sep(self): - """The sep arg test of the noe.read() user function.""" + def test_read_constraints_argfail_sep(self): + """The sep arg test of the noe.read_constraints() user function.""" # Loop over the data types. for data in DATA_TYPES: @@ -127,7 +127,7 @@ continue # The argument test. - self.assertRaises(RelaxNoneStrError, self.noe_fns.read, file='noes', sep=data[1]) + self.assertRaises(RelaxNoneStrError, self.noe_fns.read_constraints, file='noes', sep=data[1]) def test_spectrum_type_argfail_spectrum_type(self):