Skip to content

add kaggle and colab - #15

Merged
echarles merged 3 commits into
mainfrom
enh/sand
Aug 8, 2026
Merged

add kaggle and colab#15
echarles merged 3 commits into
mainfrom
enh/sand

Conversation

@echarles

@echarles echarles commented Aug 8, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 8, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new KaggleKernelExecutor + KaggleExecutionResult for batch execution via the official Kaggle API.
  • Updated Kaggle/Colab/Jupyter sandbox implementations and tests, including surfacing kernel_id in 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.

Comment thread code_sandboxes/client.py
@echarles
echarles merged commit ea24100 into main Aug 8, 2026
8 checks passed
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.

2 participants