-
Notifications
You must be signed in to change notification settings - Fork 74
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
Make TableCollections iterable #244
Conversation
1d59c57
to
439fe98
Compare
So now instead of @jeromekelleher 's ts identify checking code it's now possible to do
Which I think is a little cleaner. Or possibly, to avoid string definitions:
|
Even better, we can easily check identity without the provenance timestamps having to be the same:
|
Codecov Report
@@ Coverage Diff @@
## master #244 +/- ##
==========================================
+ Coverage 86.64% 86.66% +0.01%
==========================================
Files 17 17
Lines 9437 9446 +9
Branches 1712 1712
==========================================
+ Hits 8177 8186 +9
Misses 750 750
Partials 510 510
Continue to review 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.
I can't think of any other meaning we could have for __iter__
, so this seems like a sensible way of using it. I think we should use the simple definition based on generators for production code though (can use current definition for testing).
439fe98
to
f492ef1
Compare
@jeromekelleher: do you think it is also worth including the table-check-without-timestamps code in tskit? e.g.
|
No, to be honest. We're spending more time on making this stuff that we would save. |
04359b2
to
e13294a
Compare
Looks good, thanks and ready to merge. Can you do a quick rebase to bring it up to date please? |
e13294a
to
9fe458d
Compare
Done |
No test cases yet, I'll write them once the idea is approved