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

Fix: EDRReader fails when reading only one step #4030

Merged
merged 4 commits into from
Feb 20, 2023

Conversation

BFedder
Copy link
Contributor

@BFedder BFedder commented Feb 18, 2023

Fixes #3999

Changes made in this Pull Request:

  • the _read_next_step() method now checks if only one frame is present. If so, the StopIteration exception is not raised.

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Base: 93.53% // Head: 93.53% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (74c0d6a) compared to base (d27a32a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4030   +/-   ##
========================================
  Coverage    93.53%   93.53%           
========================================
  Files          191      191           
  Lines        25062    25063    +1     
  Branches      3547     3548    +1     
========================================
+ Hits         23442    23443    +1     
  Misses        1099     1099           
  Partials       521      521           
Impacted Files Coverage Δ
package/MDAnalysis/auxiliary/EDR.py 98.91% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@IAlibay IAlibay added this to the 2.5.0 milestone Feb 18, 2023
Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

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

LGTM :)

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.

If n_steps is defined a priori then you don't need to also define SINGLE_FRAME?

package/MDAnalysis/auxiliary/EDR.py Outdated Show resolved Hide resolved
package/MDAnalysis/auxiliary/EDR.py Outdated Show resolved Hide resolved
@BFedder
Copy link
Contributor Author

BFedder commented Feb 20, 2023

Good point, cheers!

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.

CI failure is fixed in develop, I'm happy with things as-is.

@IAlibay IAlibay merged commit 508ed96 into MDAnalysis:develop Feb 20, 2023
@IAlibay IAlibay added the defect label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EDR reader fails when only one step is present
4 participants