Fix and cover RMSD#889
Conversation
|
why wasn't this raising an error in the tests? Isn't this covered in the test? |
|
This coverage report seems to indicate not! . I will go ahead and write some tests for the RMSD class. |
|
It seems like RMSD is ripe for a refactor to the Bauhaus API too, so I could just go ahead and do that as well. |
|
Yes if you like. Please finish the dmap first though |
|
Leave refactor for later (as Max said). Fixing the bug and some tests are good enough for this PR. Re: naming: I don't like RMSDSingleFrame, it still looks like a class. But ultimately your choice, just do it :-). |
|
On it. |
|
Now is as good as a time as any, what are open file handles and how do I close them? |
| next (Issue #869) | ||
| * Display of Deprecation warnings doesn't affect other modules anymore (Issue #754) | ||
| * Changed nframes to n_frames in analysis modules for consistency (Issue #890) | ||
| * Removed call to protected process_selection function in RMSD |
There was a problem hiding this comment.
Leave this out from the CHANGELOG. I don't think that this was broeken in 0.15.0 or was it? If it was broken then this would be an entry under fixes, just stating that rms.RMSD was fixed (and reference #897)
| if self.rmsd is None: | ||
| raise NoDataError("rmsd has not been calculated yet") | ||
| np.savetxt(filename, self.rmsd) | ||
| np.save(filename, self.rmsd) |
There was a problem hiding this comment.
Why did you change this? This can break code for users, don't do this light-heartedly! Please revert!
save and savetxt are two very different things.
|
There are a few mistakes and additional tests that I will go ahead and work on tonight. Beyond that, packing for a weekend in the bay before _SCIPY 2016_ |
|
Spurious test failures |
|
Rerun the test on Travis. There should be a little reload button in the upper right. At least there is one for me when I have to do this. Oliver Beckstein
|
|
I have it but for some reason it throws an error saying the job can't be restarted, it's either a bug or a permissions issue. |
|
I will be away from the computer until late tonight. I hope everything looks alright. 1% coverage increase has to be nice :) |
|
Travis appears to be happy now. Everything passed. |
|
Still WIP or ready to be merged? |
|
Ready to be merged. All the todos are todone. There are still some minor
|
|
Ah, just read the top post where you said:
Answers:
|
| import matplotlib.pyplot as plt | ||
| rmsd = R.rmsd.T # transpose makes it easier for plotting | ||
| time = rmsd[1] | ||
| time = rmsd[1]facebook.com |
There was a problem hiding this comment.
There's a random "facebook.com" in the docs. Please remove.
|
@jdetle very good job! I'd like you to attend to the comments – primarily always Thanks a lot for fixing and testing RMSD. |
|
Comments attended to! |
|
Thanks a lot @jdetle, good work! |
Fixed (temporarily) broken analysis.rms.RMSD and added missing tests - fixes MDAnalysis#897 - full testing of the RMSD class Updated CHANGELOG * Added tests for RMSD, added a testfile. Changed RMSD class to save rmsd array as numpy file instead of text. * Tested saving * Test group selections Reverted back to save. Updated test coverage for exceptions. Found some errors with logging requiring a message. Reverted inclusion of unnecessary RMSD array. Fixed a small error and combined save and mass_weighted test. No Data Error. Covered RMSD.save(). * Fixed error messages * Asserted everywhere, fixed error messages.
Fixes: #897
Changes made in this Pull Request:
_process_selectionas opposed toprocess_selectionin RMSD (one that I think I created a while back)TODO
runCurrently left for another PR
Currently stuck