-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP8 changes #1021
PEP8 changes #1021
Conversation
just clean up most complains of my PEP8 checker (flake8)
@@ -907,7 +913,7 @@ def forces(self): | |||
def forces(self, values): | |||
ts = self._u.trajectory.ts | |||
try: | |||
ts.forces[self._ix, :] = forces | |||
ts.forces[self._ix, :] = values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have tripped a test....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one would think so. I'm currently writing tests for the write function. If you find more spots where tests are needed to be triggered by this change please mark them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where would old tests for this be?
@@ -2,7 +2,8 @@ | |||
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 | |||
# | |||
# MDAnalysis --- http://www.MDAnalysis.org | |||
# Copyright (c) 2006-2015 Naveen Michaud-Agrawal, Elizabeth J. Denning, Oliver Beckstein | |||
# Copyright (c) 2006-2015 Naveen Michaud-Agrawal, Elizabeth J. Denning, Oliver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you change this here, will @tylerjereddy 's #1002 still work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. I can remove this one change though. But we have this mixed format in almost all the files already. Everytime I changed the formatting in some random file.
@@ -20,11 +21,12 @@ | |||
import numpy as np | |||
import functools | |||
import itertools | |||
import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really, os
was used but not imported and did not fail a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the same goes for transformations. I'm writing tests now that are affected by the changes. But this just shows how important a good style checker is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tested now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed now.
Ok, then Tyler will have to deal with it.
Oliver Beckstein * [email protected] |
@richardjgowers I'd appreciate some help with the failing travis tests. Not sure if I accidentally broke something with this. |
Those 4 failures are OK, they got added with some recent new tests Kyle added |
- make code simpler - no filename given means pdbs are written
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where would tests for that be. I'm still a bit confused by the new github UI as it looks.
@@ -907,7 +913,7 @@ def forces(self): | |||
def forces(self, values): | |||
ts = self._u.trajectory.ts | |||
try: | |||
ts.forces[self._ix, :] = forces | |||
ts.forces[self._ix, :] = values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where would old tests for this be?
should cover it all now
d287ed8
to
dcc1a84
Compare
OK after looking into develop the transformations tests have never existed. So I will take care of them with #1010. @richardjgowers if you want to take care of the force setter tests I would consider this done. |
Force setter tests I think are in something called On Fri, 7 Oct 2016, 9:16 p.m. Max Linke, [email protected] wrote:
|
I've also added tests for the forces now. |
Changes made in this Pull Request:
I'm sure this fixed some bugs due to missing imports. I haven't written tests for that code yet though.
PR Checklist