Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/build_prod_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ jobs:
uppercase: 'true'
prefix: 'tool_version_'

- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
activate-environment: true

- name: Install development dependencies
working-directory: ./template
run: pip install -r requirements-dev.txt
run: uv pip install -r requirements-dev.txt

- name: Resolve target environment
env:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build_test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ jobs:
echo "Version: $VERSION"
sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt

- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
activate-environment: true

- name: Install development dependencies
working-directory: ./template
run: pip install -r requirements-dev.txt
run: uv pip install -r requirements-dev.txt

- name: Generate Template Name
id: generate-template-id
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/charts_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,18 @@ jobs:
uppercase: 'true'
prefix: 'tool_version_'

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'

- name: Install and configure Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
with:
version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
enable-cache: true

- name: Install dependencies
run: poetry install
run: uv sync --locked

- name: Test build
run: poetry build
run: uv build

- name: Run tests
run: poetry run pytest --verbose -x
run: uv run pytest --verbose -x
18 changes: 6 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,18 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'

- name: Install and configure Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
with:
version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
enable-cache: true

- name: Install Python dependencies
working-directory: chart_data_extractor
run: |
poetry install --with dev
pip install ruff=="0.11.12"
uv sync --locked
uv tool install ruff==0.11.12

- name: Run linting
run: |
Expand Down
49 changes: 21 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,12 @@ jobs:
with:
version: ${{ env.TOOL_VERSION_PNPM }}

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'

- name: Install and configure Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
with:
version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
enable-cache: true

- name: Configure pnpm
run: |
Expand All @@ -154,13 +148,12 @@ jobs:

- name: Release new versions
run: |
poetry build
poetry config pypi-token.pypi ${PYPI_TOKEN}
poetry publish --skip-existing
uv build
uv publish --check-url https://pypi.org/simple/
working-directory: ./chart_data_extractor
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.CHARTS_PYPI_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.CHARTS_PYPI_TOKEN }}

- name: Output new version
id: output_version
Expand Down Expand Up @@ -207,13 +200,16 @@ jobs:

sed -i "s/e2b_charts/e2b_charts==${VERSION}/g" requirements.txt

- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
activate-environment: true

- name: Install development dependencies
working-directory: ./template
run: pip install -r requirements-dev.txt
run: uv pip install -r requirements-dev.txt

- name: Build and push to DockerHub
working-directory: ./template
Expand Down Expand Up @@ -241,13 +237,16 @@ jobs:
uppercase: 'true'
prefix: 'tool_version_'

- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'
activate-environment: true

- name: Install development dependencies
working-directory: ./template
run: pip install -r requirements-dev.txt
run: uv pip install -r requirements-dev.txt

- name: Build E2B template
id: build-template
Expand Down Expand Up @@ -287,18 +286,12 @@ jobs:
uppercase: 'true'
prefix: 'tool_version_'

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '${{ env.TOOL_VERSION_UV }}'
python-version: '${{ env.TOOL_VERSION_PYTHON }}'

- name: Install and configure Poetry
uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2
with:
version: '${{ env.TOOL_VERSION_POETRY }}'
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
enable-cache: true

- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
python 3.10
poetry 2.1.1
uv 0.10.0
# Keep in sync with `packageManager` in package.json — pnpm self-switches to
# that version at runtime.
pnpm 10.34.5
Expand Down
12 changes: 6 additions & 6 deletions chart_data_extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"private": true,
"version": "1.0.0",
"scripts": {
"test": "poetry run pytest -n 4 --verbose -x",
"example": "poetry run python3 example.py",
"postVersion": "poetry version $(pnpm pkg get version --workspaces=false | tr -d \\\")",
"pretest": "poetry install",
"lint": "poetry run ruff check .",
"format": "poetry run ruff format ."
"test": "uv run pytest -n 4 --verbose -x",
"example": "uv run python3 example.py",
"postVersion": "uv version $(pnpm pkg get version --workspaces=false | tr -d \\\")",
"pretest": "uv sync",
"lint": "uv run ruff check .",
"format": "uv run ruff format ."
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.11.0",
Expand Down
Loading
Loading