fix: examples - #22
Open
echarles wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the interactive REPL experience by adding an :examples command (caller-provided, sandbox-tailored snippets) and fixes Daytona GPU sandbox creation by ensuring all GPU sandboxes are requested as ephemeral per Daytona API requirements.
Changes:
- Add
:examplessupport torun_repl(...), including help/banner integration and example snippet rendering. - Fix Daytona GPU sandbox creation by setting
auto_delete_interval=0for any GPU request (not onlyspot=True). - Update REPL example scripts and documentation to supply and describe tailored snippets; add/adjust tests and changelog.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_daytona.py | Adds regression test ensuring GPU sandboxes are always requested as ephemeral. |
| tests/test_console.py | Adds tests covering :examples output behavior, dedenting, and help visibility. |
| examples/repl/monty_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/modal_sandbox_example.py | Supplies GPU-conditional snippet sets via run_repl(..., examples=...). |
| examples/repl/kaggle_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/jupyter_server_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/google_colab_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/eval_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/e2b_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/docker_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/daytona_sandbox_example.py | Supplies GPU-conditional snippet sets via run_repl(..., examples=...). |
| examples/repl/datalayer_sandbox_example.py | Supplies REPL snippet set via run_repl(..., examples=...). |
| examples/repl/coreweave_sandbox_example.py | Supplies GPU-conditional snippet sets via run_repl(..., examples=...). |
| examples/repl/cloudflare_sandbox_example.py | Supplies REPL snippet set emphasizing statelessness, via run_repl(..., examples=...). |
| docs/docs/providers/daytona.mdx | Documents Daytona’s “GPU sandboxes must be ephemeral” rule and behavior. |
| docs/docs/examples/index.mdx | Documents :examples usage and what it prints. |
| docs/docs/cli/index.mdx | Documents :examples and shows how to pass snippets into run_repl. |
| code_sandboxes/daytona_sandbox.py | Implements GPU detection helper and sets auto_delete_interval=0 for any GPU request. |
| code_sandboxes/console.py | Adds show_examples(...), :examples command handling, and help/banner updates. |
| code_sandboxes/version.py | Bumps version to 1.1.3. |
| code_sandboxes/init.py | Exports show_examples. |
| CHANGELOG.md | Adds Unreleased notes for :examples and Daytona GPU ephemeral fix. |
💡 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.
No description provided.