Repository navigation
Fix #2207 - make feature position instances pickable - #2209
Conversation
…s are (un)picklable
Codecov Report
@@ Coverage Diff @@
## master #2209 +/- ##
==========================================
+ Coverage 84.68% 84.69% +0.01%
==========================================
Files 317 317
Lines 51448 51454 +6
==========================================
+ Hits 43570 43581 +11
+ Misses 7878 7873 -5
Continue to review full report at Codecov.
|
| >>> p2 == 13 | ||
| True | ||
|
|
||
|
|
There was a problem hiding this comment.
Could you move this to the __getnewargs__ docstring instead?
|
|
||
| i.e. For equality (and sorting) the position objects behave like | ||
| integers. | ||
|
|
There was a problem hiding this comment.
Again, could you move this to the __getnewargs__ docstring please.
| >>> p2 == 1901 | ||
| True | ||
|
|
||
| To allow pickling and unpickling of class instances, the arguments |
There was a problem hiding this comment.
Same comment, this isn't of general interest but __getnewargs__ lacks any docstring at all - this would work better there I think.
|
I'd like a cosmetic change in the docstring placement, but otherwise the change looks good. Are you comfortable adding something to |
|
I agree, the docstrings were out of place, so I've rewritten as method-level docstrings. But doctests don't seem to run from here, so I've converted the original doctests to unittests in Test/SeqFeature.py. Note that the scope of the tests is unchanged. To the extent I understand what is required here, these tests cover it, but happy to add more if there is something specific I have missed. |
|
Doctests are fragile, so having explicit unittests seems better all round. Are you OK with a squash-merge? Do you want your name in the |
|
Yes, squash-merge is fine. I'm happy to have my name in NEWS and CONTRIB if you think it is warranted. |
I need to be more careful when I edit these things via the Web Interface...
|
Thank you, applied. |
All contributors as tracked by version control have agreed: - Adam Sjøgren https://mailman.open-bio.org/pipermail/biopython/2019-October/016696.html - Chris MacRaild (@macraild) biopython#2209 - James Jeffryes (@JamesJeffryes) biopython#1499 - Kai Blin (@kblin) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900
All contributors as tracked by version control have agreed: - Adam Sjøgren https://mailman.open-bio.org/pipermail/biopython/2019-October/016696.html - Chris MacRaild (@macraild) biopython#2209 - James Jeffryes (@JamesJeffryes) biopython#1499 - Kai Blin (@kblin) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900
This adds __getnewargs__ to SeqFeatures.*Positions classes where required, so that instances are (un)picklable
This pull request addresses issue #2207
[X ] I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.
[X ] I have read the
CONTRIBUTING.rstfile, have runflake8locally, andunderstand that AppVeyor and TravisCI will be used to confirm the Biopython unit
tests and style checks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)