Added copy method for AuxReaders#3887
Conversation
Codecov ReportBase: 93.52% // Head: 93.52% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #3887 +/- ##
========================================
Coverage 93.52% 93.52%
========================================
Files 190 190
Lines 25028 25037 +9
Branches 3542 3543 +1
========================================
+ Hits 23407 23417 +10
+ Misses 1100 1099 -1
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. |
| @@ -323,7 +323,9 @@ def __init__(self, represent_ts_as='closest', auxname=None, cutoff=None, | |||
| self.rewind() | |||
|
|
|||
| def copy(self): | |||
There was a problem hiding this comment.
in the docstring can it be made explicit if this is a deep (a completely independent thing with its own file handles etc, no shared resources) or shallow (might share a resource like a file handle with the original) copy?
There was a problem hiding this comment.
I'm going to block on this query for docs from @richardjgowers - also changelog, etc.. the usuals
There was a problem hiding this comment.
I think "deep" was meant to clarify
There was a problem hiding this comment.
Missed that, but please do take the above as an overall "docs" please - versionchanged addition would be good
There was a problem hiding this comment.
Yeah sorry I approved too hastily my brain isn't working properly today. 😅
|
@BFedder this looks good. With how you're copying the ould it make more sense to define |
|
I have never used |
package/MDAnalysis/auxiliary/base.py
Outdated
| new_reader = pickle.loads(orig_dict) | ||
| return new_reader | ||
|
|
||
| def __getstate__(self): |
| @@ -323,7 +323,9 @@ def __init__(self, represent_ts_as='closest', auxname=None, cutoff=None, | |||
| self.rewind() | |||
|
|
|||
| def copy(self): | |||
There was a problem hiding this comment.
I'm going to block on this query for docs from @richardjgowers - also changelog, etc.. the usuals
|
@IAlibay sorry forgot CHANGELOG. |
|
Added versionchanged and changelog entries now. Also, yes @hmacdope, turns out the |
|
@BFedder would you mind resolving conflicts? @richardjgowers / @IAlibay can you please look if you're happy or state what needs to be done to complete the PR? |
IAlibay
left a comment
There was a problem hiding this comment.
I went ahead and fixed the merge issue with the changelog, lgtm!
|
Thanks for the fix, @IAlibay! |
|
@BFedder could you please update the PR and then we can merge it. Sorry for the delay, not sure why we didn't merge more than a month ago. If in doubt, just ping people after a few days... |
|
darker is complaining about quotation marks ... https://github.com/MDAnalysis/mdanalysis/actions/runs/3859059696/jobs/6578235368 — if you could please fix those, too, then that's one thing less to worry about later |
|
I have taken care of the merge conflicts and the quotation marks darker was complaining about, but now the azure run for Win-Python38-32 bit is failing because |
|
https://stackoverflow.com/questions/49151057/valueerror-not-a-location-id-invalid-object-id-while-creating-hdf5-datasets suggests that our error is due to access on a closed file. This seems odd as the same tests pass elsewhere. I'll try to restart the test (and send a few prayers or curses in the general direction of the code deities). |
|
Your prayers and/or curses appear to have done the trick, thanks! How odd. Is this ready to merge, then? |
Fixes #1785
Changes made in this Pull Request:
PR Checklist