Skip to content

Support a KwargsInput as a source of a MultiSourceInput - #49

Merged
thorwhalen merged 1 commit into
masterfrom
fix/kwargs-input-in-multi-source
Oct 20, 2026
Merged

thorwhalen merged 1 commit into
masterfrom
fix/kwargs-input-in-multi-source

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Closes #45

What

A section fed its input specs only to the input of its kwargs parameter (_feed_kwargs_input_spec). A KwargsInput configured as one of the sources of a MultiSourceInput therefore got inputs=None: its nested inputs had no bound_data_factory and no element for their types, so the app failed as soon as that source was rendered ('NoneType' object is not iterable, or No factory provided to build a BoundData / keywords must be strings depending on what was configured by hand).

ExecContainerBase now also feeds the section's input specs to every kwargs-input source of a multi-source input (_feed_multi_source_kwargs_input_specs), leaving out the multi-source input's own spec (so a nested parameter of the same name does not nest it again) and the kwargs one. The source's own nested inputs win over the section's. The merge logic is shared with the kwargs case through _with_section_inputs; nothing is mutated (the #39 isolation still holds).

Tests

  • tests/test_kwargs_input_in_multi_source.py: renders the kwargs source through a minimal concrete section; checks values, nested element types, nested keys scoped to the multi-source input (Input keys inside a KwargsInput are derived from get_kwargs, so they collide across functions #40), and that the source's own nested inputs win. All three fail without the fix.
  • Verified end to end with a streamlit AppTest app using streamlitfront's MultiSourceInput + KwargsInput: selecting the kwargs source renders its widgets and submitting returns {'a': 5, 'b': 'hi'}.
  • Full suite: 102 passed. Dependents gate (extrude, opyratorfront, streamlitfront) run before merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WbXPoGdRqSs54sWhBnyaFS

A section fed its input specs only to the input of its `kwargs` parameter,
so a kwargs input configured as one of the sources of a multi-source input
got no nested `inputs`: its nested inputs had no `bound_data_factory` and no
element for their types, and the app failed as soon as that source rendered.

ExecContainerBase now also feeds the section's input specs (minus the
multi-source input's own spec and the `kwargs` one) to every kwargs-input
source of a multi-source input, with the source's own nested inputs winning.

Closes #45

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thorwhalen
thorwhalen merged commit 7382169 into master Oct 20, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the fix/kwargs-input-in-multi-source branch October 20, 2026 16:41
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.

A KwargsInput inside a MultiSourceInput fails at app build

1 participant