Summary
Direct node instantiation now accepts typed *NodeData payloads, but the constructor keyword is still named config. That name no longer matches the value being passed.
Problem
After the node initialization refactor in #38 and PR #39, code such as HttpRequestNode(node_id=..., config=HttpRequestNodeData(...)) treats a typed node data object as config. The type and the keyword point at different concepts:
node_config is still the outer raw graph payload with {id, data}
- the constructor argument is the inner typed node data payload
This makes direct instantiation less clear, especially in nodes that already have real *_config collaborators such as http_request_config.
Proposed Change
Rename the constructor keyword from config to data for Node.__init__ and the concrete node subclasses that now accept typed node data instances.
Scope
- update
Node.__init__ and concrete node subclasses
- update direct instantiation call sites in examples and tests
- keep raw graph boundary types such as
NodeConfigDict unchanged
Context
This is a follow-up to #38 and PR #39 rather than a duplicate of them.
Summary
Direct node instantiation now accepts typed
*NodeDatapayloads, but the constructor keyword is still namedconfig. That name no longer matches the value being passed.Problem
After the node initialization refactor in #38 and PR #39, code such as
HttpRequestNode(node_id=..., config=HttpRequestNodeData(...))treats a typed node data object asconfig. The type and the keyword point at different concepts:node_configis still the outer raw graph payload with{id, data}This makes direct instantiation less clear, especially in nodes that already have real
*_configcollaborators such ashttp_request_config.Proposed Change
Rename the constructor keyword from
configtodataforNode.__init__and the concrete node subclasses that now accept typed node data instances.Scope
Node.__init__and concrete node subclassesNodeConfigDictunchangedContext
This is a follow-up to #38 and PR #39 rather than a duplicate of them.