Skip to content

Combine node inputs and outputs generation into a single node_signature function - #498

Open
loichuder wants to merge 2 commits into
mainfrom
node-signature
Open

Combine node inputs and outputs generation into a single node_signature function#498
loichuder wants to merge 2 commits into
mainfrom
node-signature

Conversation

@loichuder

Copy link
Copy Markdown
Member

PR summary

Addresses #493 (comment)

While it allows to merge the inputs/outputs generation, it does not seem to help much for checking connections. node_signature works on a node-per-node basis while checking for connections need full graph knowledge.

Perhaps I missed something in your comment.

AI Disclosure

  • Claude code used for generating the tests

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.23404% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ewokscore/graph/inputs.py 85.71% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread src/ewokscore/graph/inputs.py Outdated
Comment thread src/ewokscore/graph/inputs.py Outdated
Comment thread src/ewokscore/graph/inputs.py
Comment thread src/ewokscore/graph/models.py Outdated
task_identifier: str
import_error: Optional[Exception]
inputs: List[NodeInput]
outputs: List[str]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need something else than the output name?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can have everything and input has, even a value in the case of a pydantic model (default value).

Whether we need it, not sure, but when talking about a signature API then I would say yes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which case the name NodeInput doesn't cut it anymore.

Since we already renamed the original to GraphInput we can give it any name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have to add a parsing simliar to inputs but for outputs in this case. Want me to do it in this PR or another one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do it in this PR.

@loichuder
loichuder requested a review from woutdenolf August 28, 2026 14:15


def node_inputs(node_id: NodeIdType, node_attrs: Dict[str, Any]) -> NodeInputs:
def node_signature(node_id: NodeIdType, node_attrs: Dict[str, Any]) -> NodeSignature:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can stay for this PR but in a follow up I would move this to another module. inputs.py does not cover it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants