-
Notifications
You must be signed in to change notification settings - Fork 78
Add include_terminal param #787
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
Add include_terminal param #787
Conversation
|
Exciting segfault here. Will investigate! |
9fc9623 to
45d3530
Compare
|
So I've been fiddling with this for a good while, and it doesn't segfault on my machine, so I can't work out why it does on circleCI, especially as it fails on an old test, and I have defaulted to unchanged behaviour. Any help spotting my mistake here would be vrey gratefully accepted @benjeffery or @jeromekelleher. It would be helpful to have this PR working so that I can sort out the KC polytomy-breaking stuff for Wilder. |
|
I can look at this - hopefully will be able to recreate! |
|
Thanks so much. I wouldn't normally pester, but I've been banging my head against it for a few hours now! |
|
My previous traumatic experiences with the Python C API have helped here. A close reading of https://docs.python.org/3/c-api/arg.html#other-objects shows that an |
|
Thanks. I'd never have caught that! |
jeromekelleher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but needs more tests. Definitely on the C side we want to exercise this on a few different topology types - what happens on an empty ts? An ordinary ts with several trees? We have to think through all the corner cases.
b4a3f1d to
2e7d0fa
Compare
Can we not test an empty ts, multi-tree ts etc at the python level? We have a function |
No, because we can't run valgrind when Python is running and would therefore not detect memory access issues (which are non-deterministic and differ across platforms, so you can't just say "it doesn't segfault, so it's fine"). There's loads of tests checking for empty tree sequences across the suite - the test_highlevel.py approach isn't how we're doing things any more. |
Ah, OK. Apart from your suggestion above for all
Added anyway: I think there's no harm, and a function to produce a whole set of different semi-pathological tree sequences seems a useful thing to have around. |
Once the tests are implemented valgrind is run on them automatically, checking for these errors. |
benjeffery
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think I found am incorrect variable usage in the python C layer, and one comment about test style.
bbe5d41 to
cc6464c
Compare
benjeffery
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks @hyanwong! We just need a changelog before merge.
cc6464c to
01c1255
Compare
|
Let's hold off on this until our bugfix releases have been shipped. |
01c1255 to
ef51dd4
Compare
|
I think this is ready to merge @benjeffery ? |
benjeffery
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, lets merge.
2f6a848 to
e91b436
Compare
|
@hyanwong I've just force pushed to resolve the conflict and add the change to the C changelog too as this is a change to both APIs. |
Fixes #783