-
Notifications
You must be signed in to change notification settings - Fork 664
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
made universe for A and B to fix doctest fails #4023
Conversation
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.
Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on the developer mailing list so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS
as part of this PR.
Codecov ReportBase: 93.52% // Head: 93.52% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## develop #4023 +/- ##
========================================
Coverage 93.52% 93.52%
========================================
Files 190 190
Lines 25028 25028
Branches 3542 3542
========================================
Hits 23407 23407
Misses 1100 1100
Partials 521 521
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. |
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.
Looks good to me. Thanks for the contribution!
We ask that all first time contributors introduce themselves on the developer mailing list so we can get to know you. Please also add yourself to package/AUTHORS as part of this PR and then I can merge.
@hmacdope |
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.
Please fix the indicated issues.
Run doctest or at least copy&paste a python session that shows that the code worked: if someone copies your fixed code, it should run without errors.
Also add yourself to
- your name to AUTHORS
- your GitHub handle @Telomelonia to top of CHANGELOG under the current release in progress
- confirm that you have introduced yourself on the developer mailing list (mention this PR/issue)
package/MDAnalysis/analysis/align.py
Outdated
>>> A = mda.Universe('topol.tpr','traj.trr') | ||
>>> B = mda.Universe('topol.tpr','traj.trr') |
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.
I suggest using A.copy()
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.
Make B
as a copy of A
.
package/MDAnalysis/analysis/align.py
Outdated
@@ -245,7 +245,8 @@ def rotation_matrix(a, b, weights=None): | |||
`R` can be used as an argument for | |||
:meth:`MDAnalysis.core.groups.AtomGroup.rotate` to generate a rotated | |||
selection, e.g. :: | |||
|
|||
>>> A = mda.Universe('topol.tpr','traj.trr') | |||
>>> B = mda.Universe('topol.tpr','traj.trr') | |||
>>> R = rotation_matrix(A.select_atoms('backbone').positions, | |||
>>> B.select_atoms('backbone').positions)[0] |
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.
use ...
instead of >>>
to indicate line continuation
Hello @Telomelonia , are you still working on the PR? If so, please address my comments. Otherwise we will close the PR as stale. |
@orbeckst |
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.
Please see comments and resolve the conflicts. Thanks!
package/MDAnalysis/analysis/align.py
Outdated
>>> A = mda.Universe('topol.tpr','traj.trr') | ||
>>> B = mda.Universe('topol.tpr','traj.trr') |
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.
Make B
as a copy of A
.
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.
Please try out your code. Copy and paste the output from a Python session that demonstrates that your code is working.
@@ -245,9 +245,11 @@ def rotation_matrix(a, b, weights=None): | |||
`R` can be used as an argument for | |||
:meth:`MDAnalysis.core.groups.AtomGroup.rotate` to generate a rotated | |||
selection, e.g. :: | |||
|
|||
>>> from MDAnalysisTests.datafiles import TPR, TRR | |||
>>> A = mda.Universe('topol.tpr','traj.trr') |
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.
fix
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.
Yeah. I am fixing this, but I am getting errors, and I don't know why, but I need time to understand before debugging
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.
Show your code, then I can help.
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.
@orbeckst, thanks, but I am currently having my semester exams 😄. So, I will try to continue after that ✌️
Please also resolve conflicts. |
@Telomelonia , we just fixed #4044, which is important for your PR because it ensures that MDAnalysisTests is available for doctests. Please Resolve conflicts and while doing so, merge the current develop branch changes into your PR. Then make sure that all the checks pass. |
Yea .. sure I will rebase it to develop branch |
I think you can just use the "Resolve conflicts" button in the GH userinterface (but rebase also works). |
@Telomelonia I hope your exams went well. Can you provide a date by when you'll be able to pick up the PR again? |
sure I will try to clear this PR by this weekend. |
@orbeckst |
Sorry for the delayed response. You need to import actual test files from MDAnalysisTests.datafiles import TPR, TRR and then use those. |
@HunterZ17 |
Fixes #3365
Changes made in this Pull Request:
As discussed in the issue, the expected value should not be changed.
PR Checklist