Skip to content

chore(template): bundle e2b-charts in the template instead of PyPI - #363

Merged
mishushakov merged 3 commits into
mainfrom
devin/1793717597-embed-e2b-charts
Nov 3, 2026
Merged

mishushakov merged 3 commits into
mainfrom
devin/1793717597-embed-e2b-charts

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Ships the chart data extractor from source with the template so e2b-charts can be unpublished from PyPI, and tests it only through the sandbox suite.

  • chart_data_extractor/ moves to template/charts/. It is now a plain uv_build package with no lockfile or dev group. It has to live inside template/ because that directory is the template's file context.
  • The template copies it and installs it as a local path requirement, in the same pip resolve as everything else:
    # template/requirements.txt
    -e2b_charts
    +./charts
    # template/template.py
    +.copy("charts", "charts")
     .copy("requirements.txt", "requirements.txt")
    The import in startup_scripts/0002_data.py (from e2b_charts import chart_figure_to_dict) is unchanged.
  • The build backend is pinned exactly, requires = ["uv_build==0.13.4"] (previously >=0.10.0,<0.11.0). pip builds ./charts in an isolated env during the image build, so this keeps a new uv_build release from being pulled in automatically.
  • Tests: the in-process unit tests are deleted along with charts_tests.yml. tests/charts already covered every figure case against a real sandbox. The two gaps are added there:
    • test_blank.py: an empty figure gives chart == {}.
    • test_grid_lines.py: axhline, axvline and grid lines are not chart elements, which covers is_grid_line.
  • Release: drops the charts-release job (PyPI trusted publish) and the sed e2b_charts==VERSION pinning in release.yml and build_test_template.yml. Template builds now run only for @e2b/code-interpreter-template changesets, so chart changes need a template changeset.
  • @e2b/data-extractor is removed from the pnpm workspace; its package.json only versioned the PyPI release. Its CHANGELOG.md is removed too.
  • New template/.dockerignore keeps a local charts/.venv and caches out of the build context.

Branch protection: charts-tests / Chart Data Extractor - Build and test was a required check and no longer exists. Remove it from the required checks.

Link to Devin session: https://app.devin.ai/sessions/89cd9e9b64e74c8db84e1e74794c1455
Open in Devin Desktop: https://app.devin.ai/desktop/session/89cd9e9b64e74c8db84e1e74794c1455?variant=devin
Requested by: @mishushakov

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@cla-bot cla-bot Bot added the cla-signed label Nov 3, 2026
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@mishushakov
mishushakov marked this pull request as ready for review November 3, 2026 15:19
@mishushakov
mishushakov self-requested a review as a code owner November 3, 2026 15:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T15:22:29.325530Z 0f02ffd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

@claude claude Bot 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.

I reviewed this PR and didn't find any bugs. It changes how the release pipeline ships the chart extractor, and it removes a required branch-protection check, so a code owner should still look at it.

What was reviewed:

  • Template packaging: .copy("charts", "charts") and ./charts in requirements.txt both resolve inside the template/ file context, and the copy runs before pip install.
  • release.yml gating: build-docker-image and build-template now depend only on preflight.outputs.template. No job still refers to charts-release or its outputs.
  • New tests: test_blank.py uses the existing client fixture and test_grid_lines.py uses the run_chart fixture from tests/charts/conftest.py.
Extended reasoning...

The change moves the e2b_charts sources into template/charts/ unchanged and installs them as a local path requirement. It deletes the package's PyPI publish job, its unit tests and the charts_tests.yml workflow, which provides a required status check. It also removes the package from the pnpm workspace and lockfile. It touches no injection, auth or data-exposure surface; the only credential-related change is that the PyPI trusted-publish job is gone. CODEOWNERS assigns every path to a single owner, and the change alters how releases work (chart changes now need a template changeset), so a human should review it instead of an automatic approval.

Comment thread template/template.py Resolved
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1793717597-embed-e2b-charts branch from 71db37c to 5c11238 Compare November 3, 2026 16:08
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/1793717597-embed-e2b-charts branch from 5c11238 to c97ec63 Compare November 3, 2026 16:11
@mishushakov
mishushakov enabled auto-merge (squash) November 3, 2026 16:20
@mishushakov
mishushakov merged commit c49b786 into main Nov 3, 2026
10 checks passed
@mishushakov
mishushakov deleted the devin/1793717597-embed-e2b-charts branch November 3, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant