Skip to content

Commit 7378b9f

Browse files
authored
build(test-celery-beat-parent-span-id): Migrate from pip to uv (#64)
Replace requirements.txt with pyproject.toml and update run-beat.sh, run-celery.sh, run-flask.sh, and start-task.sh to use uv for dependency management and script execution. Refs PY-2433
1 parent 76702c7 commit 7378b9f

6 files changed

Lines changed: 27 additions & 48 deletions

File tree

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

test-celery-beat-parent-span-id/requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
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 beat \
10+
uv run celery -A tasks.app beat \
1811
--loglevel=INFO
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
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 \
10+
uv run celery -A tasks.app worker \
1811
--loglevel=INFO \
1912
-c 1
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-
flask --app main run
10+
uv run flask --app main run
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
#!/usr/bin/env bash
2-
3-
# exit on first error
42
set -euo pipefail
53

6-
# create and activate virtual environment
7-
python -m venv .venv
8-
source .venv/bin/activate
9-
10-
# Start task
114
curl -i -X GET http://localhost:5000/

0 commit comments

Comments
 (0)