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

Catch case when windows do not span entire sequence for pair coalescence stats #2989

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

nspope
Copy link
Contributor

@nspope nspope commented Sep 19, 2024

Fixes issue reported here: #2986 (comment)

@nspope
Copy link
Contributor Author

nspope commented Sep 19, 2024

The issue was not passing TSK_REQUIRE_FULL_SPAN to tsk_treeseq_check_windows -- and I noticed that tsk_treeseq_divergence_matrix also doesn't do this here:

ret = tsk_treeseq_check_windows(self, num_windows, windows, 0);

which may be a bug? (Not sure what is intended here)

Also would it be cleaner to move this option to the header?

#define TSK_REQUIRE_FULL_SPAN 1

@nspope nspope marked this pull request as draft September 19, 2024 17:38
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.72%. Comparing base (dcee409) to head (2059859).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2989      +/-   ##
==========================================
- Coverage   89.72%   89.72%   -0.01%     
==========================================
  Files          29       29              
  Lines       31567    31567              
  Branches     6113     6113              
==========================================
- Hits        28324    28322       -2     
- Misses       1852     1853       +1     
- Partials     1391     1392       +1     
Flag Coverage Δ
c-tests 86.55% <100.00%> (ø)
lwt-tests 80.78% <ø> (ø)
python-c-tests 88.98% <ø> (-0.03%) ⬇️
python-tests 99.01% <ø> (ø)

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

Files with missing lines Coverage Δ
c/tskit/trees.c 90.45% <100.00%> (ø)

... and 1 file with indirect coverage changes

@nspope nspope marked this pull request as ready for review September 19, 2024 19:23
@nspope
Copy link
Contributor Author

nspope commented Sep 19, 2024

This is ready whenever @jeromekelleher

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.

Probably better to be consistent with other code on where the exception is coming from all right.

python/tests/test_lowlevel.py Outdated Show resolved Hide resolved
@nspope
Copy link
Contributor Author

nspope commented Sep 19, 2024

Done-- there's a number of other places in test_lowlevel.py where tskit.LibraryError is checked for rather than _tskit.LibraryError, but I left those alone here.

@jeromekelleher jeromekelleher merged commit a0baaaf into tskit-dev:main Sep 19, 2024
19 checks passed
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.

3 participants