-
Notifications
You must be signed in to change notification settings - Fork 647
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
Adjust num of parts to accomodate number of frames #4710
base: develop
Are you sure you want to change the base?
Conversation
* Investigate rdkit issue * Update azure-pipelines.yml * fix numpy 2.0 import block * fix imports
- fix MDAnalysis#4680 - PCA explicitly marked as not parallelizable (at least not with simple split-apply-combine) - add tests - update CHANGELOG
Linter Bot Results:Hi @yuxuanzhuang! 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 |
#4682 will pass with this fix. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4710 +/- ##
===========================================
- Coverage 93.54% 93.53% -0.02%
===========================================
Files 173 185 +12
Lines 21434 22505 +1071
Branches 3981 3983 +2
===========================================
+ Hits 20051 21049 +998
- Misses 929 1002 +73
Partials 454 454 ☔ View full report in Codecov by Sentry. |
warnings.warn(f"Set to {n_parts} parts to match the total number " | ||
"of frames being analyzed") |
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.
warnings.warn(f"Set to {n_parts} parts to match the total number " | |
"of frames being analyzed") | |
warnings.warn(f"Set 'n_parts' to {n_parts} to match the total number " | |
"of frames being analyzed") |
I think it's a bit clearer what is being tone this way? Feel free to ignore if you disagree.
def test_reset_n_parts_to_n_frames(u): | ||
# Issue #4685 | ||
a = FrameAnalysis(u.trajectory) |
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.
def test_reset_n_parts_to_n_frames(u): | |
# Issue #4685 | |
a = FrameAnalysis(u.trajectory) | |
def test_reset_n_parts_to_n_frames(u): | |
""" | |
Issue #4685 | |
https://github.com/MDAnalysis/mdanalysis/issues/4685 | |
""" | |
a = FrameAnalysis(u.trajectory) |
def test_reset_n_parts_to_n_frames(u): | ||
# Issue #4685 | ||
a = FrameAnalysis(u.trajectory) | ||
with pytest.warns(UserWarning, match='Set to'): |
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.
with pytest.warns(UserWarning, match='Set to'): | |
with pytest.warns(UserWarning, match="Set 'n_parts' to"): |
The change suggested above makes the test also a bit more specific.
Fixes #4685
Changes made in this Pull Request:
n_parts
to the total number of frames being analyzed ifn_parts
is bigger.PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4710.org.readthedocs.build/en/4710/