-
Notifications
You must be signed in to change notification settings - Fork 79
Change tsk_table_collection_equals to take options. #917
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #917 +/- ##
==========================================
- Coverage 93.43% 93.39% -0.04%
==========================================
Files 25 25
Lines 20134 20209 +75
Branches 808 808
==========================================
+ Hits 18812 18874 +62
- Misses 1285 1299 +14
+ Partials 37 36 -1
Continue to review full report at Codecov.
|
f399e97 to
6e07f55
Compare
|
📖 Docs for this PR can be previewed here |
|
It would be good to get some feedback here at this point @benjeffery @petrelharp @mufernando. Basically, I've added an "options" argument to all the tables and made metadata comparisons optional now. I've also added an option for ignoring provenance timestamps, which will be handy when comparing simulation outputs. Questions:
def equals(self, other, metadata=True, provenance=True, provenance_timestamp=True):rather than the current |
Well, in the use case of union'ing SLiM tree sequences, we do want to just ignore top-level metadata, so... yes?
Well, ignoring metadata should ignore schemas, but I don't think we should ignore schemas if we compare metadata. It would maybe be useful to be able to ask to compare equivalency of schemas rather than equiality at the bytes level, but that's another can of worms (to do it in C anyhow). I'd say skip it unless we actually need it?
Sounds good, plus maybe |
|
This all looks good to me. I agree that we need |
3091269 to
f82c377
Compare
|
I think this is ready for final review here. I ended up going back to the original "IGNORE_X" names, as the semantics got confusing when we changed back and forth between positive and negative in Python and C. "Ignore" is a bit longer, but I think it's quite clear what the flags go then. Speaking of semantics - are we all happy that |
benjeffery
left a comment
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 agree with the semantics we have in this PR now. Just one minor doc suggestion and a broken windows test that is easily (if somewhat unsatisfyingly) fixed.
|
LGTM! |
3fd9165 to
502a590
Compare
|
OK, great, let's get this one in then. |
502a590 to
d57ba40
Compare
d57ba40 to
5cbf581
Compare
In favour of the
tsk_table_collection_equals_with_optionsintroduced in #897.