-
Notifications
You must be signed in to change notification settings - Fork 663
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
Remove start/stop/step from AnalysisBase kwargs #2505
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2505 +/- ##
========================================
Coverage 90.47% 90.47%
========================================
Files 170 170
Lines 23091 23091
Branches 2980 2980
========================================
Hits 20891 20891
Misses 1596 1596
Partials 604 604 Continue to review full report at Codecov.
|
note that start/stop/step in AnalysisBase were deprecated
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.
Already looking good but I found a few more — can you please deal with them, too? Thanks!
- Contacts.q1q2: https://github.com/IAlibay/mdanalysis/blob/4f6e3ede7e859fa621b2d41d2cac87e35af01137/package/MDAnalysis/analysis/contacts.py#L472
- HOLEtraj is not AnalysisBase but it already looks like it and it would be easy to remove start/stop/step https://github.com/IAlibay/mdanalysis/blob/4f6e3ede7e859fa621b2d41d2cac87e35af01137/package/MDAnalysis/analysis/hole.py#L1208 as you can just set them to defaults in run() at https://github.com/IAlibay/mdanalysis/blob/4f6e3ede7e859fa621b2d41d2cac87e35af01137/package/MDAnalysis/analysis/hole.py#L1294-L1296 (namely
start, stop, step = None, None, None
) - in waterdynamics, the old hbonds.HydrogenBondAnalysis is used with start/stop constructor (https://github.com/IAlibay/mdanalysis/blob/4f6e3ede7e859fa621b2d41d2cac87e35af01137/package/MDAnalysis/analysis/waterdynamics.py#L644-L650): can you change this to call it from
h.run()
https://github.com/IAlibay/mdanalysis/blob/4f6e3ede7e859fa621b2d41d2cac87e35af01137/package/MDAnalysis/analysis/waterdynamics.py#L653 (for consistency, even if we don't touch hbonds) - waterdynamics.SurvivalProbability also deprecated start/stop/step https://github.com/IAlibay/mdanalysis/blob/4f6e3ede7e859fa621b2d41d2cac87e35af01137/package/MDAnalysis/analysis/waterdynamics.py#L1248-L1260 — can you remove this code, too, please? (I also noted that here
stop
is inclusive, which is contrary to everwhere else (stop
is exclusive) — this should changed before 1.0 but needs to be documented as an API-breaking change): either fix here in the start/stop/step PR or raise an issue if this looks more complicated an needs review from some waterdynamics authors.
@IAlibay only contacts.q1q2 is strictly part of this PR re: AnalysisBase. I would also be ok with only fixing q1q2 and then opening another issue/PR for harmonizing start/stop/step in non-standard methods with the AnalysisBase model. I leave it up to you and how much time you can spare. Thank you so much for moving the code towards 1.0 — really much appreciated!! |
@orbeckst thanks for the review 😄 So going by #1463 (comment) my plan was to do all the :class: Going by #1463 (comment) would you prefer it if I raised the non-AnalysisBase required changes as separate issues or is the dicussion here sufficient? |
Aside from A note (to self) here: |
Please raise a separate issue, then we can cleanly close this one, and have a new rallying point for new things that might rear their ugly heads. Thanks! |
Unfortunately encountered #2511 whilst fixing this, it'll need to be fixed before this PR can be tied off. |
With #2520 completed, this should be complete for :class: |
Many thanks @IAlibay ! This should be merged once CI is good. |
Addresses #1463
Changes made in this Pull Request:
start
,stop
, andstep
keywords on object creation for :class:AnalysisBase
and :class:AnalysisFromFunction
start
,stop
, andstep
keywords could be passed to__init__
aversionchanged
tag was added.To do:
AnalysisFromFunction
don't seem to test out thestart
/stop
arguments very well, it's probably worth adding an extra test there.PR Checklist