Skip to content

Commit 71e39c8

Browse files
committed
misc fix to remove sep from function input
1 parent 1b9a3c3 commit 71e39c8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

bigtree/tree/construct.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,6 @@ def nested_dict_to_tree(
567567
node_attrs: dict,
568568
name_key: str = "name",
569569
child_key: str = "children",
570-
sep: str = "/",
571570
node_type: Type[Node] = Node,
572571
) -> Node:
573572
"""Construct tree from nested recursive dictionary.
@@ -605,7 +604,6 @@ def nested_dict_to_tree(
605604
value of `child_key` (list): list of dict containing `name_key` and `child_key` (recursive)
606605
name_key (str): key of node name, value is type str
607606
child_key (str): key of child list, value is type list
608-
sep (str): path separator of created tree, defaults to `/`
609607
node_type (Type[Node]): node type of tree to be created, defaults to Node
610608
611609
Returns:
@@ -622,7 +620,6 @@ def recursive_add_child(child_dict, parent_node=None):
622620
return node
623621

624622
root_node = recursive_add_child(node_attrs)
625-
root_node.sep = sep
626623
return root_node
627624

628625

@@ -728,7 +725,6 @@ def dataframe_to_tree_by_relation(
728725
child_col: str = "",
729726
parent_col: str = "",
730727
attribute_cols: list = [],
731-
sep: str = "/",
732728
node_type: Type[Node] = Node,
733729
) -> Node:
734730
"""Construct tree from pandas DataFrame using parent and child names, return root of tree.
@@ -772,8 +768,7 @@ def dataframe_to_tree_by_relation(
772768
parent_col (str): column of data containing parent name information, defaults to None
773769
if not set, it will take the second column of data
774770
attribute_cols (list): columns of data containing node attribute information,
775-
if not set, it will take all columns of data except `path_col`
776-
sep (str): path separator of input `path_col` and created tree, defaults to `/`
771+
if not set, it will take all columns of data except `child_col` and `parent_col`
777772
node_type (Type[Node]): node type of tree to be created, defaults to Node
778773
779774
Returns:
@@ -839,5 +834,4 @@ def dataframe_to_tree_by_relation(
839834
child_node = node_type(**node_attrs)
840835
child_node.parent = parent_node
841836

842-
root_node.sep = sep
843837
return root_node

0 commit comments

Comments
 (0)