Skip to content

Commit 64e63e7

Browse files
authored
build(test-celery-sentry-propagate-traces): Migrate from pip to uv (#66)
Replace requirements.txt with pyproject.toml and update run.sh and run-celery.sh to use uv for dependency management and script execution. Refs PY-2435
1 parent bb9da5a commit 64e63e7

4 files changed

Lines changed: 23 additions & 29 deletions

File tree

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

test-celery-sentry-propagate-traces/requirements.txt

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

6-
reset
7-
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
4+
if ! command -v uv &> /dev/null; then
5+
curl -LsSf https://astral.sh/uv/install.sh | sh
6+
fi
147

158
redis-server --daemonize yes
169

17-
celery -A tasks.app worker --loglevel=DEBUG -c 1
10+
uv run celery -A tasks.app worker --loglevel=DEBUG -c 1
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +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-
reset
7-
8-
# create and activate virtual environment
9-
python -m venv .venv
10-
source .venv/bin/activate
11-
12-
# Install (or update) requirements
13-
python -m pip install -r requirements.txt
14-
15-
python main.py
8+
uv run python main.py

0 commit comments

Comments
 (0)