Skip to content
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

Deprecate ts argument to _read_next_timestep #4334

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

hmacdope
Copy link
Member

@hmacdope hmacdope commented Nov 5, 2023

Fixes #3928

Changes made in this Pull Request:

  • Adds deprecation warning for _read_next_timestep use of optional ts=None arg (barely ever used)

As this is an implementation detail I didn't add docs changes, as I couldn't see a record of it documented anywhere anyway.

The warning is guarded by a conditional to avoid an immense amount of warnings.

PR Checklist

  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4334.org.readthedocs.build/en/4334/

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests please

@@ -200,6 +200,9 @@ def _read_frame(self, i):

def _read_next_timestep(self, ts=None):
"""copy next frame into timestep"""
if ts:
warnings.warn("ts argument to _read_next_timestep is deprecated as of 2.7.0 and will be removed in 3.0.0, see #3928")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also these need to throw a deprecation warning rather than a (I believe by default) userwarning

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes very right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is marked as resolved but looks like the change hasn't been pushed? I'm going to unresolve if that's ok.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry hallucinating on my end.

Copy link

github-actions bot commented Nov 5, 2023

Linter Bot Results:

Hi @hmacdope! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ✅ Passed

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/6760331457/job/18373990953


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (5fa0d27) 93.37% compared to head (830cd88) 93.28%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4334      +/-   ##
===========================================
- Coverage    93.37%   93.28%   -0.10%     
===========================================
  Files          170      184      +14     
  Lines        22295    23433    +1138     
  Branches      4075     4089      +14     
===========================================
+ Hits         20818    21859    +1041     
- Misses         962     1047      +85     
- Partials       515      527      +12     
Files Coverage Δ
package/MDAnalysis/coordinates/TRR.py 95.78% <100.00%> (+0.13%) ⬆️
package/MDAnalysis/coordinates/XTC.py 98.46% <100.00%> (+0.07%) ⬆️
package/MDAnalysis/coordinates/base.py 94.09% <ø> (ø)
package/MDAnalysis/coordinates/DCD.py 97.36% <0.00%> (-1.30%) ⬇️
package/MDAnalysis/coordinates/DLPoly.py 94.01% <33.33%> (-1.11%) ⬇️
package/MDAnalysis/coordinates/GMS.py 86.00% <0.00%> (-1.17%) ⬇️
package/MDAnalysis/coordinates/MOL2.py 95.34% <0.00%> (-1.51%) ⬇️
package/MDAnalysis/coordinates/PDB.py 92.16% <0.00%> (-0.44%) ⬇️
package/MDAnalysis/coordinates/TRJ.py 95.41% <0.00%> (-0.44%) ⬇️
package/MDAnalysis/coordinates/TRZ.py 83.89% <0.00%> (-0.64%) ⬇️
... and 5 more

... and 14 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

JoStoe added a commit to JoStoe/mdanalysis that referenced this pull request Nov 16, 2023
@orbeckst
Copy link
Member

@RMeli can I put you in charge to shepherd this PR to completion, please?

If this doesn't work for you, please unassign yourself and let me know. Thanks!

@RMeli
Copy link
Member

RMeli commented Dec 16, 2023

Sure @orbeckst. I think this is still blocked by review comments that have not yet been addressed.

@hmacdope
Copy link
Member Author

Sure @orbeckst. I think this is still blocked by review comments that have not yet been addressed.

Yep sorry, just need to add tests and resolve review, short of time atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate the ts=None optional kwarg in _read_next_timestep() for 3.0
4 participants