Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class Kaggle and Google Colab support to Code Sandboxes by introducing provider-specific kernel clients and a Kaggle batch execution path, updating sandboxes to use these internal implementations, and expanding docs/tests accordingly.
Changes:
- Added
KaggleKernelClient/ColabKernelClient(plus URL parsers) and a newKaggleKernelExecutor+KaggleExecutionResultfor batch execution via the official Kaggle API. - Updated Kaggle/Colab/Jupyter sandbox implementations and tests, including surfacing
kernel_idin sandbox metadata. - Added a variant-neutral “Jupyter-shaped reply” facade (
execution_result_to_reply,CodeSandboxClient.execute/execute_interactive) and documented the new APIs.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_modal_colab_sandbox.py | Updates monkeypatching to target the in-repo Kaggle executor wiring. |
| tests/test_kaggle.py | Adds unit tests for Kaggle channels URL parsing and token resolution behavior. |
| tests/test_kaggle_execute.py | Adds unit tests for Kaggle batch execution, normalization helpers, and reply shaping. |
| tests/test_jupyter.py | Updates stubs to expose id to match new metadata expectations. |
| tests/test_colab.py | Adds unit tests for Colab channels URL parsing and header/param injection. |
| tests/test_client.py | Adds tests for new client facade behavior and execution-result-to-reply conversion. |
| README.md | Documents Kaggle + Colab usage patterns and links to full guides. |
| pyproject.toml | Moves Kaggle batch dependency to kaggle>=1.6 optional extra; keeps kernel client deps in base. |
| docs/docs/sandboxes/kaggle.mdx | New detailed Kaggle guide (auth modes, batch execution, accelerators, channels URL). |
| docs/docs/sandboxes/index.mdx | Updates sandbox index to reflect in-repo clients + links to new guides. |
| docs/docs/sandboxes/google-colab.mdx | New detailed Google Colab guide (proxy token, channels URL retrieval). |
| docs/docs/installation/index.mdx | Updates installation guidance (removes colab extra, clarifies requirements). |
| docs/docs/api-reference/index.mdx | Documents new client facade and new Kaggle/Colab exported APIs. |
| code_sandboxes/kaggle.py | Adds Kaggle interactive kernel client + channels URL parser. |
| code_sandboxes/kaggle_sandbox.py | Switches Kaggle sandbox to in-repo Kaggle client/executor; records kernel_id metadata. |
| code_sandboxes/kaggle_execute.py | Adds Kaggle batch executor + execution result normalization to Jupyter-like outputs. |
| code_sandboxes/jupyter_sandbox.py | Adds kernel_id to runtime metadata. |
| code_sandboxes/interfaces.py | Replaces dependency protocol inheritance with an internal ISandboxClient protocol. |
| code_sandboxes/colab.py | Adds Colab interactive kernel client + channels URL parser + proxy header/param handling. |
| code_sandboxes/colab_sandbox.py | Switches Colab sandbox to in-repo Colab client/parser; records kernel_id metadata. |
| code_sandboxes/client.py | Adds execution_result_to_reply and CodeSandboxClient.execute/execute_interactive facade methods. |
| code_sandboxes/version.py | Bumps package version to 1.0.0. |
| code_sandboxes/init.py | Exports new clients/executors/parsers and the new reply conversion helper. |
💡 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.