-
Notifications
You must be signed in to change notification settings - Fork 77
Allow skipping of sites and mutations in sort #1826
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
abbd341
to
a1b5e03
Compare
Note that we could make the breaking change to make |
Codecov Report
@@ Coverage Diff @@
## main #1826 +/- ##
==========================================
- Coverage 93.43% 93.43% -0.01%
==========================================
Files 27 27
Lines 24810 24808 -2
Branches 1094 1094
==========================================
- Hits 23181 23179 -2
Misses 1594 1594
Partials 35 35
Flags with carried forward coverage won't be shown. Click here to find out more.
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.
LGTM. It's probably not worth making edge_start
keyword only (could be unexpected breakage in downstream apps like tsinfer).
python/_tskitmodule.c
Outdated
goto out; | ||
} | ||
memset(&start, 0, sizeof(start)); | ||
start.edges = edge_start; | ||
start.sites = site_start; |
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.
Paranoia, but possibly safer the cast these to tsi_size_t
python/tskit/tables.py
Outdated
@@ -3124,6 +3124,10 @@ def sort(self, edge_start=0): | |||
are not affected. This parameter is provided to allow for efficient sorting | |||
when the user knows that the edges up to a given index are already sorted. | |||
|
|||
If both ``site_start`` and ``mutation_start`` are equal to the number of rows | |||
in their retrospective tables then both are not sorted. Note that a partial |
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.
Maybe "then neither is sorted"? Lot of negatives to wade through otherwise I think.
5c63c52
to
4be1641
Compare
All fixed up, merging. |
4be1641
to
ce64c23
Compare
Fixes #1475