Author: bugman
Date: Mon Sep 22 16:46:32 2014
New Revision: 25959
URL: http://svn.gna.org/viewcvs/relax?rev=25959&view=rev
Log:
Merged revisions 25947,25957-25958 via svnmerge from
svn+ssh://[email protected]/svn/relax/trunk
........
r25947 | bugman | 2014-09-22 11:15:17 +0200 (Mon, 22 Sep 2014) | 5 lines
Created a basic text based progress meter in the new lib.text.progress module.
This is taken from the script
test_suite/shared_data/frame_order/cam/generate_base.py.
........
r25957 | bugman | 2014-09-22 16:43:38 +0200 (Mon, 22 Sep 2014) | 6 lines
Modifications to the User_functions.test_structure_add_atom GUI test.
As lists of lists are now accepted by the structure.add_atom user function,
the operation in the GUI
is now significantly different. Therefore many checks have been removed from
the GUI test.
........
r25958 | bugman | 2014-09-22 16:44:57 +0200 (Mon, 22 Sep 2014) | 6 lines
Added safety checks for NaN values to the lib.structure.pdb_write module.
This is within the _record_validate() function. The check prevents the
creation of invalid PDB
files.
........
Added:
branches/frame_order_cleanup/lib/text/progress.py
- copied unchanged from r25958, trunk/lib/text/progress.py
Modified:
branches/frame_order_cleanup/ (props changed)
branches/frame_order_cleanup/lib/structure/pdb_write.py
branches/frame_order_cleanup/lib/text/__init__.py
branches/frame_order_cleanup/test_suite/gui_tests/test_user_functions.py
Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Sep 22 16:46:32 2014
@@ -1 +1 @@
-/trunk:1-25945
+/trunk:1-25958
Modified: branches/frame_order_cleanup/lib/structure/pdb_write.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/structure/pdb_write.py?rev=25959&r1=25958&r2=25959&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/structure/pdb_write.py (original)
+++ branches/frame_order_cleanup/lib/structure/pdb_write.py Mon Sep 22
16:46:32 2014
@@ -83,6 +83,10 @@
raise RelaxError("The PDB record '%s' is too short." % record)
else:
raise RelaxError("The PDB record '%s' is too long." % record)
+
+ # Check for nan.
+ if 'nan' in record:
+ raise RelaxError("The PDB record '%s' contains NaN values." % record)
def atom(file, serial='', name='', alt_loc='', res_name='', chain_id='',
res_seq='', icode='', x='', y='', z='', occupancy='', temp_factor='',
element='', charge=''):
Modified: branches/frame_order_cleanup/lib/text/__init__.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/text/__init__.py?rev=25959&r1=25958&r2=25959&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/text/__init__.py (original)
+++ branches/frame_order_cleanup/lib/text/__init__.py Mon Sep 22 16:46:32 2014
@@ -25,6 +25,7 @@
__all__ = [
'gui',
'sectioning',
+ 'progress',
'string',
'table'
]
Modified:
branches/frame_order_cleanup/test_suite/gui_tests/test_user_functions.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/gui_tests/test_user_functions.py?rev=25959&r1=25958&r2=25959&view=diff
==============================================================================
--- branches/frame_order_cleanup/test_suite/gui_tests/test_user_functions.py
(original)
+++ branches/frame_order_cleanup/test_suite/gui_tests/test_user_functions.py
Mon Sep 22 16:46:32 2014
@@ -200,15 +200,15 @@
uf.create_wizard(parent=self.app.gui)
# Set the y-value of a single pos, and check.
- uf.page.uf_args['pos'].selection_win_show()
- uf.page.uf_args['pos'].sel_win.sequence.SetStringItem(index=1, col=1,
label=int_to_gui(2))
- uf.page.uf_args['pos'].selection_win_data()
- pos = uf.page.uf_args['pos'].GetValue()
- print("Pos: %s" % pos)
- self.assertEqual(len(pos), 3)
- self.assertEqual(pos[0], None)
- self.assertEqual(pos[1], 2.0)
- self.assertEqual(pos[2], None)
+ #uf.page.uf_args['pos'].selection_win_show()
+ #uf.page.uf_args['pos'].sel_win.sequence.SetStringItem(index=1, col=1,
label=int_to_gui(2))
+ #uf.page.uf_args['pos'].selection_win_data()
+ #pos = uf.page.uf_args['pos'].GetValue()
+ #print("Pos: %s" % pos)
+ #self.assertEqual(len(pos), 3)
+ #self.assertEqual(pos[0], None)
+ #self.assertEqual(pos[1], 2.0)
+ #self.assertEqual(pos[2], None)
# Set the pos to nothing in the wizard, open the Sequence window,
close the window, and check that None comes back.
uf.page.uf_args['pos'].SetValue(str_to_gui(''))
@@ -232,7 +232,7 @@
self.assertEqual(pos[2], -3.0)
# Set the pos to a number of invalid values, checking that they are
ignored.
- for val in ['2', 'die', '[1, 2, 3', '[1]', '[[1, 2, 3], 1, 2, 3], [1,
2, 3]]']:
+ for val in ['die', '[1, 2, 3', '[[1, 2, 3], 1, 2, 3], [1, 2, 3]]']:
uf.page.uf_args['pos'].SetValue(str_to_gui(val))
uf.page.uf_args['pos'].selection_win_show()
uf.page.uf_args['pos'].selection_win_data()
@@ -249,10 +249,10 @@
uf.page.uf_args['pos'].selection_win_data()
pos = uf.page.uf_args['pos'].GetValue()
print("Pos: %s" % pos)
- self.assertEqual(len(pos), 3)
+ #self.assertEqual(len(pos), 3)
self.assertEqual(pos[0], 1.0)
- self.assertEqual(pos[1], None)
- self.assertEqual(pos[2], None)
+ #self.assertEqual(pos[1], None)
+ #self.assertEqual(pos[2], None)
def test_structure_pdb_read(self):
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits