Skip to content

Set time_units #680

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
Jun 21, 2022
Merged

Conversation

hyanwong
Copy link
Member

@hyanwong hyanwong commented Jun 20, 2022

No tests yet, draft to se if this is the right simple approach.

@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #680 (9587d39) into main (34bd064) will decrease coverage by 3.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #680      +/-   ##
==========================================
- Coverage   96.32%   93.10%   -3.22%     
==========================================
  Files          12       17       +5     
  Lines        3507     5149    +1642     
  Branches      666      957     +291     
==========================================
+ Hits         3378     4794    +1416     
- Misses         96      235     +139     
- Partials       33      120      +87     
Flag Coverage Δ
C 93.10% <100.00%> (?)
python 96.32% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
tsinfer/inference.py 98.57% <100.00%> (+<0.01%) ⬆️
lib/tree_sequence_builder.c 82.82% <0.00%> (ø)
lib/object_heap.c 67.04% <0.00%> (ø)
lib/ancestor_builder.c 87.57% <0.00%> (ø)
lib/ancestor_matcher.c 90.12% <0.00%> (ø)
lib/err.c 100.00% <0.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 34bd064...9587d39. Read the comment docs.

@jeromekelleher
Copy link
Member

LGTM. Does the time_units of the ancestors tree sequence get inherited by the final tree sequence?

@hyanwong
Copy link
Member Author

LGTM.

Great

Does the time_units of the ancestors tree sequence get inherited by the final tree sequence?

I will check in the tests. About to write now. Got held up by writing the workbook!

@hyanwong hyanwong force-pushed the time_units_minimal_workaround branch from b3b315e to cc7ffc8 Compare June 21, 2022 09:30
@hyanwong
Copy link
Member Author

Tests done.

To avoid setting the time units on separate code paths, I changed get_ancestors_tree_sequence to return the tables (rather than converting the tables to a ts on the last line), then the conversion can happen in store_output. That seemed sensible anyway.

@hyanwong hyanwong marked this pull request as ready for review June 21, 2022 09:33
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, just another test and update the changelog please.

@hyanwong hyanwong force-pushed the time_units_minimal_workaround branch from cc7ffc8 to deff9c4 Compare June 21, 2022 18:36
@hyanwong hyanwong force-pushed the time_units_minimal_workaround branch from deff9c4 to 9587d39 Compare June 21, 2022 19:17
@mergify mergify bot merged commit 4f76b6a into tskit-dev:main Jun 21, 2022
@hyanwong hyanwong deleted the time_units_minimal_workaround branch October 8, 2022 10:19
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