Repository navigation
Replace ignored input read with selected_data connector, and add Excel columns write mode - #1221
Merged
Merged
Conversation
9 of 11 tasks
input read with selected_data connector, and add Excel columns write mode
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Its contract depends on inaccessible companion JS/XL changes and lacks live Excel integration verification.
0 open findings
What changed in this PR
Adds explicit selected-grid inputs and Excel write modes while preserving generic dataframe behavior.
Changes:
- Adds
grid.selected_dataandexcel.selected_data. - Adds
excel.columnsand clarifiesexcel.sheet. - Validates empty composed inputs and updates tests, schema, and documentation.
Recommended disposition: Comment only
Next steps
- Reviewer: Verify CI and companion JS/XL contracts before approval.
| File | Description |
|---|---|
wrangles/recipe.py |
Validates selected-data operands. |
wrangles/connectors/grid.py |
Adds shared selected-data input. |
wrangles/connectors/excel.py |
Adds Excel wrapper and columns writer. |
wrangles/connectors/__init__.py |
Registers the grid connector. |
tests/connectors/test_input.py |
Covers selected-data behavior and schema. |
tests/connectors/test_excel.py |
Covers Excel write modes. |
schema/generate_recipe_schema.py |
Updates help and offline validation. |
docs/spreadsheet_recipes.md |
Documents spreadsheet contracts. |
.gitignore |
Tracks the new documentation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
inputconnector was ignored in the read: based on out-of-date assumptions related to its usage. The fix here ensures that recipes that explicitly consume the calling grid's selected data have a named read contract, and fail when an expected composed input is missing or empty. This adds shared/Excel read connectors (input→selected_data) and an explicit Excel columns writer (fkadataframe) while preserving the full calculation dataframe and generic Python return behavior.Linked issue
Part of #943. Keep the issue open until the companion XL/JS integration and live verification are complete.
What changes
grid.selected_data(JS) and forwarding wrapperexcel.selected_data(XL), with the same filters and current-invocation dataframe scope.excel.columnsas spreadsheet write modecolumns(in lieu ofdataframe); retainexcel.sheetas modesheet. Each emits all requested columns for destination-specific handling in XL.input,grid.selected_data, orexcel.selected_datain join/union/concatenate, including filters that remove all rows. The tests cover all three spellings for this validation.inputexception: it may return an empty dataframe. The newgrid.selected_dataandexcel.selected_dataconnectors require nonempty data even when used outside a composed read. Legitimate empty external query results remain valid.dataframe, inline/saved nested-recipe behavior, and matrix child-write orchestration.How it was verified
Focused credential-free checks using
pytest-local.inipassed across:tests/connectors/test_input.pytests/connectors/test_excel.pytests/connectors/test_matrix.pytests/recipes/test_read.pytests/recipes/test_write.pyThe broad focused run passed 115 tests; the final input/nested/schema suite passed 38 tests, including the additional saved-recipe cases. Credential variables were removed for these checks.
git diff --checkpassed. No deployed Lambda or live Excel verification is claimed.Compatibility and risk
Existing
inputsyntax and filters remain supported. The intentional behavior change is an actionable failure for an empty expected selected-data operand in composed reads. New selected-data connectors require nonempty data and read the current transformed parent dataframe when nested.This PR does not change Lambda defaults or perform Excel writes itself. The Python package must be promoted to
execute-recipes-dev, and the development schema published, before XL development uses the new connectors. Coordinate rollback with XL/recipes already using those new names.Companion shared helpers: WranglesJS #121. XL consumer: WranglesXL #1279.
excel.tableremains separate in #1220; the empty Functions override edge remains out of scope.Ready-for-review checklist
mainand has no merge conflictsDraft while CI and the review handoff are pending.