Skip to content

Remove tree.left_root #1862

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
Nov 5, 2021
Merged

Conversation

jeromekelleher
Copy link
Member

Stacked on #1861

Closes #1796

The cases where we actually do want to explicitly iterate over the roots are rare; it's much better to push the virtual root onto a stack and let the general tree algorithms take care of things. So, there will be a bit of breakage in user code, but I think it's worth it to move them onto better ways of doing things.

TODO - the examples need updating here and we need some changelogging

@jeromekelleher jeromekelleher force-pushed the leftrootectomy branch 2 times, most recently from 6b960af to 1818f84 Compare November 3, 2021 19:50
@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #1862 (a5e6eeb) into main (fc15a46) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head a5e6eeb differs from pull request most recent head 963f840. Consider uploading reports for the commit 963f840 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1862      +/-   ##
==========================================
- Coverage   93.14%   93.13%   -0.01%     
==========================================
  Files          27       27              
  Lines       24960    24929      -31     
  Branches     1099     1095       -4     
==========================================
- Hits        23248    23217      -31     
  Misses       1677     1677              
  Partials       35       35              
Flag Coverage Δ
c-tests 92.21% <100.00%> (+<0.01%) ⬆️
lwt-tests 89.14% <ø> (ø)
python-c-tests 68.58% <ø> (+0.07%) ⬆️
python-tests 98.72% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
c/tskit/genotypes.c 93.94% <100.00%> (+0.03%) ⬆️
c/tskit/haplotype_matching.c 95.07% <100.00%> (+0.01%) ⬆️
c/tskit/trees.c 94.97% <100.00%> (+0.01%) ⬆️
c/tskit/convert.c 92.04% <0.00%> (-0.67%) ⬇️
python/_tskitmodule.c 90.36% <0.00%> (-0.01%) ⬇️
python/tskit/text_formats.py 100.00% <0.00%> (ø)
python/tskit/trees.py 97.78% <0.00%> (+<0.01%) ⬆️

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 fc15a46...963f840. Read the comment docs.

@jeromekelleher jeromekelleher marked this pull request as ready for review November 4, 2021 13:36
@jeromekelleher
Copy link
Member Author

This is ready to go in I think - I've created #1886 to track updating the documentation, which needs some better examples.

@jeromekelleher jeromekelleher mentioned this pull request Nov 4, 2021
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.

LGTM!

@mergify mergify bot merged commit 943d1e9 into tskit-dev:main Nov 5, 2021
@jeromekelleher jeromekelleher deleted the leftrootectomy branch November 5, 2021 10:56
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.

Remove tree.left_root from C API.
2 participants