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

Change Tree.unrank order of arguments to feel more natural #978

Merged
merged 3 commits into from
Nov 8, 2020

Conversation

daniel-goldstein
Copy link
Member

@daniel-goldstein daniel-goldstein commented Nov 8, 2020

Description

Changes the order of the arguments to Tree.unrank and combinatorics.num_labellings to take first the number of leaves and then the rank of the tree in question.

Fixes #950

cc: @hyanwong @jeromekelleher

PR Checklist:

  • Tests that fully cover new/changed functionality.
  • Documentation including tutorial content if appropriate.
  • Changelogs, if there are API changes.

@AdminBot-tskit
Copy link
Collaborator

📖 Docs for this PR can be previewed here

@codecov
Copy link

codecov bot commented Nov 8, 2020

Codecov Report

Merging #978 (845693c) into main (b47cd2c) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #978   +/-   ##
=======================================
  Coverage   93.40%   93.40%           
=======================================
  Files          26       26           
  Lines       20395    20395           
  Branches      825      825           
=======================================
  Hits        19050    19050           
  Misses       1308     1308           
  Partials       37       37           
Flag Coverage Δ
c-tests 92.43% <ø> (ø)
lwt-tests 93.66% <ø> (ø)
python-c-tests 94.38% <100.00%> (ø)
python-tests 98.53% <100.00%> (ø)

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

Impacted Files Coverage Δ
python/tskit/combinatorics.py 99.13% <100.00%> (ø)
python/tskit/trees.py 97.25% <100.00%> (ø)

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 b47cd2c...845693c. 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.

LGTM, thanks a lot @daniel-goldstein!

@benjeffery benjeffery added the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Nov 8, 2020
@mergify mergify bot merged commit a1f91f5 into tskit-dev:main Nov 8, 2020
@mergify mergify bot removed the AUTOMERGE-REQUESTED Ask Mergify to merge this PR label Nov 8, 2020
@benjeffery
Copy link
Member

Gah, I forgot to squash. Sorry, only 3 so no biggie.

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.

Change order of arguments in Tree.unrank?
3 participants