Skip to content

Conversation

@benjeffery
Copy link
Member

Fixes #1462

@benjeffery benjeffery force-pushed the no-iterate-topo-counter branch from 9a97abc to ddb4787 Compare June 9, 2025 00:04
@benjeffery
Copy link
Member Author

@hyanwong You're closer to this than I am - this seems like it should fix #1462. yes?

@codecov
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (ee8ccaa) to head (e49d5e7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3202   +/-   ##
=======================================
  Coverage   89.65%   89.65%           
=======================================
  Files          29       29           
  Lines       30605    30607    +2     
  Branches     5614     5614           
=======================================
+ Hits        27439    27441    +2     
  Misses       1780     1780           
  Partials     1386     1386           
Flag Coverage Δ
c-tests 86.86% <ø> (ø)
lwt-tests 80.38% <ø> (ø)
python-c-tests 86.91% <ø> (ø)
python-tests 98.76% <100.00%> (+<0.01%) ⬆️
python-tests-no-jit 33.18% <50.00%> (+<0.01%) ⬆️
python-tests-numpy1 50.84% <50.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
python/tskit/combinatorics.py 99.36% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hyanwong
Copy link
Member

hyanwong commented Jun 9, 2025

I'm not sure. I think @daniel-goldstein suggested actually implementing the iterator in #1462 (comment) rather than making it bomb out.

It should be easy, it's just choosing either 1 or 2 from his list. Do you have a preference @benjeffery ?

@benjeffery
Copy link
Member Author

Is what I've done here correct in that iterating .topologies makes sense?

@jeromekelleher
Copy link
Member

Let's take the simple path here and raise an error rather than try to implement the right thing

@benjeffery
Copy link
Member Author

Let's take the simple path here and raise an error rather than try to implement the right thing

Yes, my focus was on preventing the easy to trigger infinite loop.

@benjeffery benjeffery force-pushed the no-iterate-topo-counter branch from ddb4787 to e49d5e7 Compare October 9, 2025 12:09
@benjeffery
Copy link
Member Author

@jeromekelleher Can I get a tick here? I don't think it is worth doing more than this, we just want to prevent infinite iteration.

@benjeffery benjeffery enabled auto-merge October 9, 2025 12:11
@benjeffery benjeffery added this pull request to the merge queue Oct 9, 2025
Merged via the queue into tskit-dev:main with commit e66da01 Oct 9, 2025
16 of 18 checks passed
@benjeffery benjeffery deleted the no-iterate-topo-counter branch October 9, 2025 13:32
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.

iterating over count_topologies method never stops

3 participants