Closed drodarie closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
27ab0a9
) 84.03% compared to head (478b393
) 84.07%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Oh @drodarie another thing this kind of overlooks is that the a configuration tree is not a pure tree, there's all kinds of dependencies between the nodes, and after a tree gets bootstrapped with a scaffold there is a bunch of hidden state;
in short: a copied node might not function properly until you place it back into a configuration tree and bootstrap it.
You also ought to make sure that the nodes you copy are bijective between their component form and tree form, sometimes there's small differences
Ok so if I understand you correctly, the __copy__
function should ask the user for the configuration tree (root) in which to "place" the copied node if the node to copy is not at the root of the config? So I should check for the _is_root
property and the _config_dynamic_root
?
I understand what you mean by checking the bijective state of the tree but I am not sure of how to do it.
Ok so if I understand you correctly, the
__copy__
function should ask the user for the configuration tree (root) in which to "place" the copied node if the node to copy is not at the root of the config? So I should check for the_is_root
property and the_config_dynamic_root
? I understand what you mean by checking the bijective state of the tree but I am not sure of how to do it.
Ah, those were just 'caveat emptors', the person using copy
should understand the limitations. The copied nodes do not belong to a configuration tree, so if the copied nodes depend on being "booted" before being used, or on nodes that haven't been copied along, then they won't work anymore.
We can't do anything to overcome these limitations.
Add copy and __deep_copy__ functions to Node class.
Remaining corrections to apply: