-
Notifications
You must be signed in to change notification settings - Fork 638
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
Pathlib object handling for Universe, SingleFrameReaderBase and Toplogy parsers (Issue #3937) #4535
base: develop
Are you sure you want to change the base?
Pathlib object handling for Universe, SingleFrameReaderBase and Toplogy parsers (Issue #3937) #4535
Conversation
…se + removal of duplicate import
adding the implementation of tests for str and pathlib handling
Hello @talagayev! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-05-27 23:51:49 UTC |
Linter Bot Results:Hi @talagayev! 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 #4535 +/- ##
===========================================
- Coverage 93.66% 93.23% -0.44%
===========================================
Files 168 12 -156
Lines 21248 1079 -20169
Branches 3917 0 -3917
===========================================
- Hits 19902 1006 -18896
+ Misses 888 73 -815
+ Partials 458 0 -458 ☔ View full report in Codecov by Sentry. |
@hmacdope would you be able to look at this PR or assign to someone else, please? |
Apologies for the delay @orbeckst @talagayev, was away over easter. Reviewing now. |
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.
@talagayev you have the right idea of what to test, and your test implementations are good!
However to achieve better coverage and to make your tests more powerful you can instead add your tests to BaseReaderTest
and _SingleFrameReader
that cover the base API functionality for all relevant trajectory types. This is in estsuite/MDAnalysisTests/coordinates/base.py
. :)
Ah, I think i see :) i would than adjust it so that the tests are in Does it than make also sense to move the |
@hmacdope
in the case of |
Adjusted the tests to be in base.py
@hmacdope |
@talagayev sorry for the delay here. I will review ASAP. |
@hmacdope all good, no worries :) |
@talagayev I have pushed some changes to your branch that fix the As we are now co-authors on this I can no longer fairly review, so I will defer to one of the other @MDAnalysis/coredevs. Perhaps @tylerjereddy as the author of previous Pathlib support issues and PRs #3937 (if you have some spare cycles). |
Ok looks like I messed some stuff up, Ill fix. |
@hmacdope Hm strange error, I try to find the error going through the pytests and running the developer version of MDAnalysis with this version and can't track down the error currently. |
Partially Fixes #3937. The issue mentioned the addition of support and testing for
pathlib
objects forSingleFrameReaderBase
.Currently the
SingleFrameReaderBase
is able to handle bothpathlib
andstr
as input forSingleFrameReaderBase
to display this, this PR is focusing on tests that display the handling ofpathlib
andstr
as input forSingleFrameReaderBase
.Changes made in this Pull Request:
pathlib
object andstr
input forSingleFrameReaderBase
intest_gro.py
andtest_lammps.py
Currently the tests are as mentioned for
GRO
andLAMMPS
cases.SingleFrameReaderBase
also recognizesINPCRD
,CRD
,NAMDBIN
andDMS
if given as a single input, so tests for these cases could also be added if required.PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4535.org.readthedocs.build/en/4535/