-
Notifications
You must be signed in to change notification settings - Fork 78
Implement split_edges #2296
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
Implement split_edges #2296
Conversation
a3941ff to
fca1d31
Compare
Codecov Report
@@ Coverage Diff @@
## main #2296 +/- ##
==========================================
- Coverage 93.33% 93.32% -0.01%
==========================================
Files 27 27
Lines 26141 26256 +115
Branches 1175 1177 +2
==========================================
+ Hits 24398 24503 +105
- Misses 1713 1723 +10
Partials 30 30
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
fca1d31 to
dedec45
Compare
petrelharp
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.
Looks very well tested! All good.
dedec45 to
f4ed337
Compare
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.
Wow, nice stuff.
Just a couple of comments:
- It might be good to test what happens when split is called with
t=unknown_time? - I can't see where the provenance info mentioned in the docstring is recorded?
| if metadata is None: | ||
| metadata = tables.nodes.metadata_schema.empty_value | ||
| metadata = tables.nodes.metadata_schema.validate_and_encode_row(metadata) | ||
| # This is the easiest way to turn off encoding when calling add_row below |
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.
Does this pattern here imply we should have a way to pass in encoded metadata to add_row? Maybe encoded_metadata=?
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 think so - either that or have a boolean flag for controlling whether we encode or not?
f4ed337 to
7e5cf63
Compare
|
Thanks for the careful review @benjeffery, super helpful. I think the simplest thing is to error with nonfinite time, and have added tests. I can't be bothered with adding provenance, it feels like a waste of effort. It's easy enough to add later if we need it. |
7e5cf63 to
6d12abb
Compare
Closes #2276
Taking over part of #2240