Closed liamhuber closed 7 months ago
Coverage variation | Diff coverage |
---|---|
:white_check_mark: -0.59% (target: -1.00%) | :white_check_mark: 76.02% |
You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
The key change here is that
AbstractMacro
no longer supports theinputs_map
oroutputs_map
parameter or attribute. Further, macros no longer auto-populate IO based on the unconnected IO of their children. (Both these features are still available onWorkflow
, which retains by-reference IO.) I.e. you must define all macro IO at the class level viaoutput_labels
(or the class property_provided_output_labels
if you're directly subclassing and not using a creator) and the signature and return values of thegraph_creator
. This brings macro and function nodes substantially closer together.As a side effect of doing this, I had to re-write the for- and while-loop meta nodes, which relied heavily on the maps. While these are substantially different under the hood now, there is extremely minimal user facing changes: the
while_loop
now requires theinputs_map
andoutputs_map
parameters instead of having these be optional (although the syntax and impact of the dictionaries passed is unchanged), and neither function can accept un-importable classes for looping on (this is a pretty edge case, basically no defining a class inside some function or class scope and then trying to loop over it).Changes to the while-loop and macro exploitation of UI nodes had the knock-on effect that I needed new connections to prepend to the connections list instead of append. Recall that when fetching data we always took data from the first source in our connection list that offered it; now we are just giving higher priority to newer connections instead of older ones (this is documented in the
Node
docstring).Non-goal: Actually making the loop nodes I want, described in #268 -- here I tried to keep the minimal changes that would let all the tests pass.
EDIT: Also for-loops are now creating channels for all their body node's input, and not taking any of the defaults or hints from the body node (this is really tricky to convert to text, and I want to change these loops anyhow so I didn't spend all day on that) -- so that means all the channels need input. A pain, but a manageable one.