-
Notifications
You must be signed in to change notification settings - Fork 664
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
wateranalysis: fix for empty selections and PEP8 #1323
Conversation
Note: This needs to be merged (don't do anything with rebase because otherwise the author information will get messed up). |
@alejob I rewrote the history of your PR to format it as two nice separate commits:
Please check that everything looks ok. I did minor orthography fixes where I found them. I also reverted a few PEP8 changes in the specific cases of division and comma, e.g. val0 / n, val1 / n to
roughly following PEP: whitespace: Other Recommendations... and simple aesthetics. |
88daafc
to
c348f85
Compare
Sorry, QC suggested to make lg2() a |
return selection | ||
|
||
# Second Legendre polynomial | ||
lg2 = lambda self,x : (3*x*x - 1)/2 | ||
@staticmethod |
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.
It makes sense.
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.
All seems good ;)
Spurious travis failure, so I restarted the job https://travis-ci.org/MDAnalysis/mdanalysis/jobs/226689879 |
@alejob , once travis completes successfully, your or I can merge the PR. |
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.
All ok to merge.
I can't merge the PR, I'm not allowed. |
We need another review from an @MDAnalysis/coredevs .
(I can't merge it either.) |
- wateranalysis could not handle empty selections: now we check explicitly and return 0 or (0, 0, 0) when necessary - Improved print to screen format; now uses ProgressMeter - Avoiding hidden return inside if/else (improves code readability) and made lg2(x) a static method - Added test - Fixed some orthography. - CHANGELOG updated.
- Adapted to PEP8, not fully, but most - CHANGELOG formatting fixes
c348f85
to
3c8e31f
Compare
I manually rebased against develop and force-pushed. |
This is @alejob 's PR #1322 after rebase against develop and history-condensing
Changes made in this Pull Request:
This PR supersedes #1322 and closes #1322.
PR Checklist