Skip to content
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

Fix bug in missing ancestral states #738

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

hyanwong
Copy link
Member

A silly typo ("ancestral_allele" -> "ancestral_state") revealed that the test suite wasn't comprehensive enough for missing ancestral states, and needs a bit of tweaking to be able to test this corner case.

@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Merging #738 (e43d749) into main (de277cf) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #738   +/-   ##
=======================================
  Coverage   93.36%   93.36%           
=======================================
  Files          17       17           
  Lines        5317     5317           
  Branches      977      977           
=======================================
  Hits         4964     4964           
  Misses        233      233           
  Partials      120      120           
Flag Coverage Δ
C 93.36% <ø> (ø)
python 96.54% <ø> (ø)

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

Impacted Files Coverage Δ
tsinfer/inference.py 98.75% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hyanwong
Copy link
Member Author

It would be good to merge this bugfix: the codebase change is minimal, although the test suite change is more involved, sadly. I have simply called return from TestSparseAncestorsRoundTrip:: verify_data_round_trip for the newly introduced case where we have unknown ancestral states (and therefore can't generate sties without placing some on using parsimony), but perhaps I should call some form of skip instead?

@jeromekelleher
Copy link
Member

The test suite changes take a bit of time to digest I'm afraid, looking at it now.

@hyanwong
Copy link
Member Author

Yes, sorry about that. It would probably be easier if we had #739 , but I though it better to fix ASAP.

Copy link
Member

@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.

LGTM

@mergify mergify bot merged commit 8548c82 into tskit-dev:main Oct 17, 2022
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