Skip to content

different separator in subtree #303

@fostermaier

Description

@fostermaier

Describe the issue

When taking a subtree, the separator of the subtree is different from the separator of the original tree.
This feels like a very unexpected behavior.

Environment

  • Platform: Windows
  • Python version: 3.12
  • bigtree version: 0.19.3

To Reproduce

from bigtree import Node, get_subtree

tree = Node("a", sep='.')
b = Node("b", parent=tree)
c = Node("c", parent=b)
d = Node("d", parent=b)
e = Node("e", parent=tree)
print(tree.path_name)

>> .a


subtree = get_subtree(tree, '.a.b')
print(subtree.path_name)

>> /b

Expected behaviour

check sep of original root node and propagate to root node of subtree accordingly

Screenshots

No response

Additional context

No response

Final Check

  • I will watch this issue to stay updated with any comments or requests for additional information. I understand that timely responses will help in resolving the issue more quickly.

  • I have thoroughly searched the documentation, and I have also checked for existing solutions or similar issues before submitting this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions