-
Notifications
You must be signed in to change notification settings - Fork 661
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
ChainedReader __repr__ fix for MemoryReader sub-readers #4407
Conversation
Linter Bot Results:Hi @ljwoods2! Thanks for making this PR. We linted your code and found the following: Some issues were found with the formatting of your code.
Please have a look at the Please note: The |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4407 +/- ##
===========================================
- Coverage 93.38% 93.38% -0.01%
===========================================
Files 171 185 +14
Lines 21737 22858 +1121
Branches 4012 4014 +2
===========================================
+ Hits 20300 21346 +1046
- Misses 951 1025 +74
- Partials 486 487 +1 ☔ View full report in Codecov by Sentry. |
7075060
to
54031f0
Compare
Thanks @ljwoods2. I just had a look at the original issue #3349 and realised there is an open PR #3344 which includes a fix for the same issue. Unfortunately that PR seems to have stalled. @mnmelo, would you be OK to address #3349 here, or do you prefer to keep it as part of #3344 (which we can hopefully get going again)? |
Hi, Definitely address it here. At least that much gets fixed, even if I don't get the time to advance #3344. |
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.
Thanks for making this much-needed fix, @ljwoods2! I left a couple comments -- IMO it'd be better to check all filenames than simply the first one.
The pep8 bot also has flagged a couple lines as not following PEP8 -- could you please fix those?
@lilyminium Thank you for the feedback, I appreciate the pointers! Just revised based on your tips and changed repr to make more sense with the potential case of prepending an ndarray to a trajectory, let me know your thoughts. |
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.
Thanks for making these changes, they look really good @ljwoods2! This is a bit nitpicky but would you also mind adding a direct check of self.filenames
(maybe as part of test_issue_3349
)? You can access the universe's coordinate reader through u.trajectory[.filenames]
. After that I reckon this would be 100% good to go!
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.
Nitpick, otherwise LGTM (besides @lilyminium outstanding requested change).
Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
@lilyminium Done, let me know what you think |
@lilyminium could you please push this PR over the finish line as you have the only outstanding review and it seems to be almost done? Thanks! |
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.
LGTM -- thank you for the fix @ljwoods2!
Fixes #3349
Changes made in this Pull Request:
If there is a use case for a ChainedReader with both MemoryReader sub-readers and other sub-reader types, this solution won't work because it depends on all the filenames being the same type. Let me know and I can fix it!
PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4407.org.readthedocs.build/en/4407/