Skip to content

Commit c49b786

Browse files
chore(template): bundle e2b-charts in the template instead of PyPI (#363)
* chore(template): bundle e2b-charts in the template instead of PyPI Co-Authored-By: mish@e2b.dev <mish@e2b.dev> * test(charts): run chart tests only through the sandbox suite Co-Authored-By: mish@e2b.dev <mish@e2b.dev> * chore(charts): pin the uv_build backend to an exact version Co-Authored-By: mish@e2b.dev <mish@e2b.dev> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: mish@e2b.dev <mish@e2b.dev>
1 parent 7c895a1 commit c49b786

44 files changed

Lines changed: 52 additions & 2495 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/bundle-e2b-charts.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter-template': patch
3+
---
4+
5+
Install the chart data extractor (`e2b_charts`) from `template/charts` in the repository instead of PyPI. `e2b-charts` is no longer published; chart changes now ship with template releases.

‎.github/scripts/build_release_itinerary.cjs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const path = require('path')
88
// Packages are listed in this order; anything not named here still shows up,
99
// under its workspace name, after the ones that are.
1010
const labels = {
11-
'@e2b/data-extractor': 'Charts (e2b-charts)',
1211
'@e2b/code-interpreter-template': 'Sandbox template (code-interpreter)',
1312
}
1413

‎.github/workflows/build_test_template.yml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ jobs:
3434
uppercase: 'true'
3535
prefix: 'tool_version_'
3636

37-
- name: Set package version
38-
working-directory: ./template
39-
run: |
40-
VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
41-
echo "Version: $VERSION"
42-
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
43-
4437
- name: Install uv
4538
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
4639
with:

‎.github/workflows/charts_tests.yml‎

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎.github/workflows/lint.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949

5050
- name: Install Python dependencies
5151
run: |
52-
(cd chart_data_extractor && uv sync --locked)
5352
(cd tests && uv sync --locked)
5453
uv tool install ruff==0.11.12
5554

‎.github/workflows/pull_request.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,3 @@ jobs:
3737
with:
3838
E2B_DOMAIN: ${{ vars.E2B_DOMAIN }}
3939
E2B_TESTS_TEMPLATE: ${{ needs.build-template.outputs.template_id }}
40-
charts-tests:
41-
uses: ./.github/workflows/charts_tests.yml

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
runs-on: ubuntu-latest
2020
outputs:
2121
release: ${{ steps.version.outputs.release }}
22-
charts: ${{ steps.charts.outputs.release }}
2322
template: ${{ steps.template.outputs.release }}
2423
itinerary: ${{ steps.itinerary.outputs.itinerary }}
2524
steps:
@@ -72,13 +71,6 @@ jobs:
7271
IS_RELEASE=$(./.github/scripts/is_release.sh)
7372
echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT"
7473
75-
- name: Check Charts SDK Release
76-
id: charts
77-
if: steps.version.outputs.release == 'true'
78-
run: |
79-
IS_RELEASE=$(./.github/scripts/is_release_for_package.sh "@e2b/data-extractor")
80-
echo "release=$IS_RELEASE" >> "$GITHUB_OUTPUT"
81-
8274
- name: Check Template SDK Release
8375
id: template
8476
if: steps.version.outputs.release == 'true'
@@ -102,71 +94,13 @@ jobs:
10294
echo "EOF"
10395
} >> "$GITHUB_OUTPUT"
10496
105-
charts-release:
106-
name: Charts release
107-
needs: [preflight]
108-
if: needs.preflight.outputs.charts == 'true'
109-
runs-on: ubuntu-latest
110-
outputs:
111-
version: ${{ steps.output_version.outputs.version }}
112-
steps:
113-
- name: Checkout Repo
114-
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
115-
116-
- name: Parse .tool-versions
117-
uses: wistia/parse-tool-versions@32f568a4ffd4bfa7720ebf93f171597d1ebc979a # v2.1.1
118-
with:
119-
filename: '.tool-versions'
120-
uppercase: 'true'
121-
prefix: 'tool_version_'
122-
123-
- name: Install pnpm
124-
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
125-
id: pnpm-install
126-
with:
127-
version: ${{ env.TOOL_VERSION_PNPM }}
128-
129-
- name: Install uv
130-
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
131-
with:
132-
version: '${{ env.TOOL_VERSION_UV }}'
133-
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
134-
enable-cache: true
135-
136-
- name: Configure pnpm
137-
run: |
138-
pnpm config set auto-install-peers true
139-
pnpm config set exclude-links-from-lockfile true
140-
141-
- name: Install dependencies
142-
run: pnpm install --frozen-lockfile
143-
144-
- name: Create new versions
145-
run: pnpm run version
146-
env:
147-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148-
149-
- name: Release new versions
150-
# OIDC trusted publishing (`id-token: write` above), as in e2b-dev/E2B,
151-
# instead of a long-lived PyPI token that expires and 403s the release.
152-
run: |
153-
uv build
154-
uv publish --trusted-publishing always --check-url https://pypi.org/simple/
155-
working-directory: ./chart_data_extractor
156-
157-
- name: Output new version
158-
id: output_version
159-
working-directory: ./chart_data_extractor
160-
run: |
161-
echo "version=$(pnpm pkg get version --workspaces=false | tr -d \\\")" >> "$GITHUB_OUTPUT"
162-
16397
build-docker-image:
16498
name: Build Docker Image
16599
runs-on: ubuntu-latest
166-
needs: [preflight, charts-release]
100+
needs: [preflight]
167101
if: (!cancelled()) &&
168102
!contains(needs.*.result, 'failure') &&
169-
(needs.preflight.outputs.template == 'true' || needs.preflight.outputs.charts == 'true')
103+
needs.preflight.outputs.template == 'true'
170104
steps:
171105
- name: Checkout repository
172106
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
@@ -187,18 +121,6 @@ jobs:
187121
username: ${{ secrets.DOCKERHUB_USERNAME }}
188122
password: ${{ secrets.DOCKERHUB_TOKEN }}
189123

190-
- name: Set package version
191-
working-directory: ./template
192-
run: |
193-
if [ -z "${{ needs.charts-release.outputs.version }}" ]; then
194-
VERSION=$(cat ../chart_data_extractor/pyproject.toml | grep version | cut -d '"' -f 2)
195-
else
196-
VERSION=${{ needs.charts-release.outputs.version }}
197-
fi
198-
echo "Version: $VERSION"
199-
200-
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt
201-
202124
- name: Install uv
203125
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
204126
with:
@@ -224,7 +146,7 @@ jobs:
224146
needs: [preflight, build-docker-image]
225147
if: (!cancelled()) &&
226148
!contains(needs.*.result, 'failure') &&
227-
(needs.preflight.outputs.template == 'true' || needs.preflight.outputs.charts == 'true')
149+
needs.preflight.outputs.template == 'true'
228150
steps:
229151
- name: Checkout repository
230152
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
@@ -260,7 +182,7 @@ jobs:
260182
# Every upstream job is listed, not just the last one: a job that fails makes
261183
# its dependents *skip*, and a skipped job is not a failure — so gating on
262184
# `needs.*.result` only works for the jobs this one depends on directly.
263-
needs: [preflight, charts-release, build-docker-image, build-template]
185+
needs: [preflight, build-docker-image, build-template]
264186
if: (!cancelled()) &&
265187
!contains(needs.*.result, 'failure') &&
266188
needs.preflight.outputs.release == 'true'
@@ -395,7 +317,7 @@ jobs:
395317
report-failure:
396318
# `preflight` included so a failure there is reported too, whether or not
397319
# `failure()` looks past this job's direct dependencies.
398-
needs: [preflight, charts-release, build-docker-image, build-template, release]
320+
needs: [preflight, build-docker-image, build-template, release]
399321
if: failure()
400322
name: Code Interpreter Release Failed - Slack Notification
401323
runs-on: ubuntu-latest

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
2121
--->
2222
> [!NOTE]
23-
> The `@e2b/code-interpreter` and `e2b-code-interpreter` SDK sources now live in the [E2B monorepo](https://github.com/e2b-dev/E2B), under `packages/code-interpreter-js` and `packages/code-interpreter-python`. Open SDK issues and pull requests there. This repository keeps the sandbox template and the chart data extractor.
23+
> The `@e2b/code-interpreter` and `e2b-code-interpreter` SDK sources now live in the [E2B monorepo](https://github.com/e2b-dev/E2B), under `packages/code-interpreter-js` and `packages/code-interpreter-python`. Open SDK issues and pull requests there. This repository keeps the sandbox template, which bundles the chart data extractor (`template/charts`).
2424
2525
## What is E2B?
2626
[E2B](https://e2b.dev/?utm_source=github&utm_medium=referral&utm_campaign=readme&utm_content=code-interpreter) is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter).

‎chart_data_extractor/CHANGELOG.md‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎chart_data_extractor/package.json‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)