Skip to content

Column takeset #2032

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

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Column takeset #2032

merged 1 commit into from
Mar 8, 2022

Conversation

jeromekelleher
Copy link
Member

Provide x_table_takeset_columns

Part of #2016, #1977, #537, #538

This is my initial outline for discussion, and completely untested. What do you think @benjeffery?

@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #2032 (c527398) into main (bb43c74) will decrease coverage by 0.20%.
The diff coverage is 90.98%.

❗ Current head c527398 differs from pull request most recent head c0ef9e4. Consider uploading reports for the commit c0ef9e4 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2032      +/-   ##
==========================================
- Coverage   93.33%   93.12%   -0.21%     
==========================================
  Files          27       27              
  Lines       25538    26452     +914     
  Branches     1163     1292     +129     
==========================================
+ Hits        23835    24633     +798     
- Misses       1673     1787     +114     
- Partials       30       32       +2     
Flag Coverage Δ
c-tests 92.25% <90.98%> (-0.01%) ⬇️
lwt-tests 89.05% <ø> (ø)
python-c-tests 72.10% <ø> (+<0.01%) ⬆️
python-tests 98.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
c/tskit/tables.c 90.21% <90.98%> (-0.06%) ⬇️
python/tskit/tables.py 93.46% <0.00%> (-5.44%) ⬇️
python/_tskitmodule.c 90.96% <0.00%> (+0.03%) ⬆️
c/tskit/genotypes.c 92.58% <0.00%> (+2.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb43c74...c0ef9e4. Read the comment docs.

Copy link
Member

@benjeffery benjeffery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, shame we have to duplicate some logic but a separate function is the way.

@benjeffery
Copy link
Member

I've rebased to master, trying this out with the kastore changes.

@benjeffery
Copy link
Member

Added an initial test and fix. Next step is testing missing columns and bad combos.

@jeromekelleher
Copy link
Member Author

Great - can you ping me when you'd like some input here please? (Would it be simpler to start your own PR or is it the same thing to just push to my branch? I don't mind)

@benjeffery
Copy link
Member

Great - can you ping me when you'd like some input here please? (Would it be simpler to start your own PR or is it the same thing to just push to my branch? I don't mind)

My plan is to complete the proposal and tests for the IndividualTable, then get feedback. It's almost there so later today. Will push to this one if that's ok!

@benjeffery
Copy link
Member

@jeromekelleher Had to move things about to get errors to happen before memory is changed. I think this is worth a review now.

@jeromekelleher
Copy link
Member Author

LGTM! I've had a good think about how we might avoid the duplication of NULL logic between here and append_columns but I can't see how it could be done (at least not in a way that would be worse than the code duplication). Press on with this pattern would be my vote.

@benjeffery
Copy link
Member

Great, I have commenced the great pasting ritual.

@benjeffery benjeffery marked this pull request as ready for review March 2, 2022 17:41
@benjeffery
Copy link
Member

@jeromekelleher Think this is ready to review now!

@benjeffery
Copy link
Member

Just realised we also need takeset indexes too!

@benjeffery
Copy link
Member

@jeromekelleher Ok! I think we are good here, I've used these methods over at #2143 successfully.

@benjeffery
Copy link
Member

Gah, missing coverage on all the ragged-column-contents error branches. Will add that in.

@benjeffery benjeffery force-pushed the take-cols branch 5 times, most recently from 38398c7 to dbd2e34 Compare March 8, 2022 00:41
@benjeffery
Copy link
Member

Ok, tests added. I think all the remaining uncovered branches are only triggerable by malloc errors.

Copy link
Member Author

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for slogging through this @benjeffery.

I think we just need to add a few tests to cover the check_ragged_column calls on the input. It should be straightforward enough to do by setting x_col_offset = -1 (or something). That will bump up the test coverage quite a bit.

@benjeffery benjeffery force-pushed the take-cols branch 3 times, most recently from a94a620 to cdb753e Compare March 8, 2022 11:29
@jeromekelleher
Copy link
Member Author

Can you ping me when this is ready for a last look please @benjeffery?

@benjeffery
Copy link
Member

@jeromekelleher Ok! Coverage looks a lot better.

Copy link
Member Author

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, let's merge!

(I can't approve this as it's my PR - you'll need to approve yourself I think)

@benjeffery benjeffery added the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Mar 8, 2022
@mergify mergify bot merged commit d0369d4 into tskit-dev:main Mar 8, 2022
@mergify mergify bot removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Mar 8, 2022
@jeromekelleher jeromekelleher deleted the take-cols branch March 8, 2022 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants