You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/bigtree/tree/modify.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,33 +94,37 @@ If you're still feeling lost over the parameters, here are some guiding question
94
94
- Do I want to retain the original node where they are?
95
95
- Yes: Set `copy=True`
96
96
- Default performs a shift instead of copy
97
-
- Am I unsure of what nodes I am going to shift, they may or may not exist and this is perfectly fine?
97
+
- Am I unsure of what nodes I am going to copy/shift, they may or may not exist and this is perfectly fine?
98
98
- Yes: Set `skippable=True`
99
99
- Default throws error if origin node is not found
100
100
- The origin node (and its descendants) may clash with the destination node(s), how do I want to handle it?
101
101
- Set `overriding=True` to overwrite origin node
102
102
- Set `merge_attribute=True` to combine both nodes' attributes
103
103
- Default throws error about the clash in node name
104
-
- I want to shift everything under the node, but not the node itself
104
+
- I want to copy/shift everything under the node, but not the node itself
105
105
- Set `merge_children=True` or `merge_leaves=True` to shift the children and leaf nodes respectively
106
106
- Default shifts the node itself, and everything under it
107
-
- I want to shift the node and only the node, and not everything under it
107
+
- I want to copy/shift the node and only the node, and not everything under it
108
108
- Yes: Set `delete_children=True`
109
109
- Default shifts the node itself, and everything under it
110
-
- I want to shift things from one tree to another tree
110
+
- I want to copy/shift things from one tree to another tree
111
111
- Specify `to_tree`
112
112
- Default shifts nodes within the same tree
113
113
114
114
What about the permutations between the parameters?
115
115
116
-
- These parameters are standalone and does not produce any interaction effect
116
+
- These parameters are standalone and do not produce any interaction effect
117
117
-`copy`, `skippable`, `delete_children`
118
118
- These parameters have some interaction:
119
119
-`overriding` and `merge_attribute` with `merge_children` and `merge_leaves`
120
-
-`overriding` + `merge_children`: Behaves like `merge_children` when there is no clash in node name, otherwise behaves like `overriding`. Note that clashes will preserve destination nodes' children only.
121
-
-`overriding` + `merge_leaves`: Behaves like `merge_leaves` when there is no clash in node name, otherwise behaves like `overriding`. Note that clashes will preserve destination nodes' leaves only.
122
-
-`merge_attribute` + `merge_children`: Behaves like `merge_children` when there is no clash in node name, otherwise behaves like `merge_attribute`. Note that attributes will be merged for node and all descendants, and will preserve origin and destination nodes' children.
123
-
-`merge_attribute` + `merge_leaves`: Behaves like `merge_leaves` when there is no clash in node name, otherwise behaves like `merge_attribute`. Note that attributes will be merged for node and all descendants, and will preserve origin nodes' children and destination nodes' leaves.
120
+
-`overriding` + `merge_children`: Behaves like `merge_children` when there is no clash in node name, otherwise behaves like `overriding`.
121
+
Note that clashes will preserve origin node parent and destination nodes' children.
122
+
-`overriding` + `merge_leaves`: Behaves like `merge_leaves` when there is no clash in node name, otherwise behaves like `overriding`.
123
+
Note that clashes will preserve origin node parent and destination nodes' leaves.
124
+
-`merge_attribute` + `merge_children`: Behaves like `merge_children` when there is no clash in node name, otherwise behaves like `merge_attribute`.
125
+
Note that attributes will be merged for node and all descendants, and will preserve origin and destination nodes' children.
126
+
-`merge_attribute` + `merge_leaves`: Behaves like `merge_leaves` when there is no clash in node name, otherwise behaves like `merge_attribute`.
127
+
Note that attributes will be merged for node and all descendants, and will preserve origin nodes' children and destination nodes' leaves.
0 commit comments