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

sort_by_ancestry does not working correctly #425

Closed
Tracked by #415
AlexeyBoldak opened this issue Dec 6, 2018 · 3 comments
Closed
Tracked by #415

sort_by_ancestry does not working correctly #425

AlexeyBoldak opened this issue Dec 6, 2018 · 3 comments

Comments

@AlexeyBoldak
Copy link

AlexeyBoldak commented Dec 6, 2018

I found some issue with sort_by_ancestry method

It performs filtering for provided array

For example we have 5 nodes

n1
n2 -> n1
n3 -> n2 -> n1
n4 -> n1
n5 -> n4 -> n1
We build this array array_of_nodes = [n1, n2, n3, n5]

sort_by_ancestry(array_of_nodes) = [n1,n2,n3]

@kbrock
Copy link
Collaborator

kbrock commented Dec 17, 2018

Hello,

I'm pretty sure #419 addresses your issue.

It has been an issue for a long time.
without n4 being present, it is hard to know if n5 goes before or after n2 (and therefore n3)

This used to be very slow, and it was sped up, but dropping these nodes was a side effect.

@kbrock
Copy link
Collaborator

kbrock commented Dec 17, 2018

Curiously, what version of ancestry are you using?

It should be resolved in 3.0.4 [changelog]

@kbrock
Copy link
Collaborator

kbrock commented Feb 8, 2019

I added a bunch of tests around this and can not reproduce your issue.

Please comment if this is still a problem

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

No branches or pull requests

2 participants