Skip to content

Commit 358d5a1

Browse files
ericapisaniclaude
andcommitted
build(test-js-python-redis-celery): Migrate to uv and pyproject.toml
Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run scripts to use uv run instead of manual venv creation and pip install. Refs PY-2458 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4344f7e commit 358d5a1

5 files changed

Lines changed: 29 additions & 39 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[project]
2+
name = "test-js-python-redis-celery"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"celery>=5.4.0",
8+
"fastapi>=0.115.11",
9+
"ipdb>=0.13.13",
10+
"redis>=5.2.1",
11+
"sentry-sdk[fastapi,celery]",
12+
"uvicorn>=0.34.0",
13+
]
14+
15+
[tool.uv.sources]
16+
sentry-sdk = { path = "../../sentry-python", editable = true }

test-js-python-redis-celery/requirements.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
#!/usr/bin/env bash
2-
3-
# exit on first error
42
set -euo pipefail
5-
63
reset
74

8-
# create and activate virtual environment
9-
python -m venv .venv
10-
source .venv/bin/activate
11-
12-
# Install (or update) requirements
13-
pip install -r requirements.txt
5+
if ! command -v uv &> /dev/null; then
6+
curl -LsSf https://astral.sh/uv/install.sh | sh
7+
fi
148

159
redis-server --daemonize yes
1610

17-
celery -A tasks.app worker --loglevel=DEBUG -c 1
11+
uv run celery -A tasks.app worker --loglevel=DEBUG -c 1
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
#!/usr/bin/env bash
2-
3-
# exit on first error
42
set -euo pipefail
5-
63
reset
74

8-
# create and activate virtual environment
9-
python -m venv .venv
10-
source .venv/bin/activate
5+
if ! command -v uv &> /dev/null; then
6+
curl -LsSf https://astral.sh/uv/install.sh | sh
7+
fi
118

12-
python -m http.server 5000
9+
uv run python -m http.server 5000

test-js-python-redis-celery/run.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail
23

3-
# exit on first error
4-
set -xe
4+
if ! command -v uv &> /dev/null; then
5+
curl -LsSf https://astral.sh/uv/install.sh | sh
6+
fi
57

6-
# create and activate virtual environment
7-
python -m venv .venv
8-
source .venv/bin/activate
9-
10-
# Install (or update) requirements
11-
pip install -r requirements.txt
12-
13-
# Run FastAPI application on localhost:8000
14-
uvicorn main:app --reload
8+
uv run uvicorn main:app --reload

0 commit comments

Comments
 (0)