Repository navigation
Python access to Table Collection index - #916
Conversation
99429f6 to
41c3434
Compare
|
📖 Docs for this PR can be previewed here |
Codecov Report
@@ Coverage Diff @@
## main #916 +/- ##
==========================================
- Coverage 93.39% 93.39% -0.01%
==========================================
Files 25 25
Lines 20209 20284 +75
Branches 808 810 +2
==========================================
+ Hits 18874 18944 +70
- Misses 1299 1304 +5
Partials 36 36
Continue to review full report at Codecov.
|
6cfaad6 to
1be416e
Compare
1be416e to
a2a74f9
Compare
8f1b6e7 to
f4a9523
Compare
|
Waiting for #921 (comment) to be resolved before merging. |
|
@jeromekelleher I've just realised (belatedly) that I need to do |
|
I think we should standardise on either calling this Since the file format has Let's resolve this issue here before picking up #921 |
jeromekelleher
left a comment
There was a problem hiding this comment.
I think it should be indexes through out, and let's add the functionality and tests for set_indexes here, to keep the lwt changes separate.
|
@jeromekelleher This now has write access to the indexes from the Python API and a new flag on |
|
I've changed the default to be not building indexes, the major change is that |
jeromekelleher
left a comment
There was a problem hiding this comment.
Looks good, just a few minor inconsistencies
| @param edge_removal_order Array of tsk_id_t edge ids | ||
| @return Return 0 on success or a negative value on failure. | ||
| */ | ||
| int tsk_table_collection_set_index(tsk_table_collection_t *self, |
There was a problem hiding this comment.
Should this be set_indexes for consistency I wonder? There is two of them, so it's not illogical. If we do add more indexes in the future, then we can add the required parameters here - this would break the API, but this is a pretty niche function anyway so no biggie.
| def test_index(self): | ||
| i = np.arange(20) | ||
| r = np.arange(20)[::-1] | ||
| index = tskit.TableCollectionIndex(edge_insertion_order=i, edge_removal_order=r) |
There was a problem hiding this comment.
Should probably be TableCollectionIndexes for consistency
0b9a25e to
849c45e
Compare
849c45e to
b1da7b6
Compare
Fixes #4
There is a separate issue for LWT (#870) so I'll do a new PR for that.