Header of process and node ports follow each other both ways: a panel edit rewrites only the def line of edited code, a code save reads the header back into input ports and settings (draft and response); Space types in the node editor again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
@@ -29,6 +29,24 @@ Inside a node, `import fluksio` exposes reporting and artifact helpers. It
|
||||
does not expose the engine's internal modules. Other imports come from the
|
||||
node's Python environment; see [Packages](#packages).
|
||||
|
||||
## The header follows the ports
|
||||
|
||||
On the canvas, the parameters of `process` and the node's input ports and
|
||||
settings are kept in step, in both directions.
|
||||
|
||||
- Changing ports or settings in the node panel rewrites the
|
||||
`def process(...)` line and leaves the rest of the code as it is. Input
|
||||
ports come first, in their order, then the settings. A parameter that stays
|
||||
keeps its annotation and default.
|
||||
- Saving the code reads that line back. A name the node already has keeps
|
||||
its kind. A new parameter becomes a setting when it has a default, which
|
||||
becomes its value, or when it comes after a setting. Any other new
|
||||
parameter becomes an input port. Removing a parameter removes its port or
|
||||
setting, and renaming a single one renames the port (keeping its message)
|
||||
or the setting (keeping its value).
|
||||
- Shared code, code from `fluksio sync`, and a header with a decorator,
|
||||
`*args`, `**kwargs`, a bare `*` or `/` are left alone in both directions.
|
||||
|
||||
## Producing values over time
|
||||
|
||||
Yield dictionaries to publish outputs before the node finishes:
|
||||
|
||||
Reference in New Issue
Block a user