Add Transform Python quickstart sample scripts - #9
Merged
3 commits merged intoAug 22, 2026
Merged
Conversation
Add extract_quickstart.py (partition + structured data extraction) and transform_quickstart.py (partition only), matching the scripts shown in the Python quickstart page.
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
The script only runs a Partitioner node, not a full transform pipeline. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Addresses cubic-dev-ai review feedback on PR #9: leaving these open through polling and download risks exhausting file descriptors on directories with many input files. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Shadow auto-approve: would not auto-approve. Auto-approval blocked by 1 unresolved issue from previous reviews.
Re-trigger cubic
ghost
approved these changes
Aug 22, 2026
ghost
deleted the
doc-271-transform-api-quickstarts
branch
August 22, 2026 14:04
This pull request was closed.
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.
Summary
transform/sample-code/extract_quickstart.py— partitions a file and extracts structured data with anExtractornodetransform/sample-code/partition_quickstart.py— partitions a file only, no structured extractionNote:
cubic-dev-ai (automated review bot) flagged that both scripts open a file handle for every file in
INPUT_DIRbut never close them.The fix wraps the
create_jobcall in try/finally and closes every file handle in the finally block, so cleanup runs whether the call succeeds or raises.I'm implementing the suggested fix because quickstart code like this may get copied into production pipelines, where a directory with thousands of files could hit the OS's open-file-descriptor limit and crash.
Retested both scripts end to end after the update. Both completed and output saved with no errors.
Test plan
🤖 Generated with Claude Code