Skip to content

Commit 57adfdd

Browse files
ericapisaniclaude
andcommitted
build(test-fastapi-distributed-tracing): Migrate to uv and pyproject.toml
Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run1.sh and run2.sh to use uv run instead of manual venv creation and pip install. Refs PY-2449 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4344f7e commit 57adfdd

4 files changed

Lines changed: 24 additions & 30 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-fastapi-distributed-tracing"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"black>=25.1.0",
8+
"fastapi>=0.115.11",
9+
"ipdb>=0.13.13",
10+
"requests>=2.32.3",
11+
"sentry-sdk[fastapi]",
12+
"uvicorn>=0.34.0",
13+
]
14+
15+
[tool.uv.sources]
16+
sentry-sdk = { path = "../../sentry-python", editable = true }

test-fastapi-distributed-tracing/requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
#!/usr/bin/env bash
2-
32
set -euo pipefail
4-
53
reset
64

7-
python -m venv .venv
8-
source .venv/bin/activate
9-
10-
pip install -r requirements.txt
11-
12-
# uvicorn main:app --port 5000 --reload --root-path /api/v1 &
13-
uvicorn main1:app --port 5001 --reload
5+
if ! command -v uv &> /dev/null; then
6+
curl -LsSf https://astral.sh/uv/install.sh | sh
7+
fi
148

15-
#nginx -c "$(pwd)/nginx.conf"
9+
uv run uvicorn main1:app --port 5001 --reload
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
#!/usr/bin/env bash
2-
32
set -euo pipefail
4-
53
reset
64

7-
python -m venv .venv
8-
source .venv/bin/activate
9-
10-
pip install -r requirements.txt
11-
12-
# uvicorn main:app --port 5000 --reload --root-path /api/v1 &
13-
uvicorn main2:app --port 5002 --reload
5+
if ! command -v uv &> /dev/null; then
6+
curl -LsSf https://astral.sh/uv/install.sh | sh
7+
fi
148

15-
#nginx -c "$(pwd)/nginx.conf"
9+
uv run uvicorn main2:app --port 5002 --reload

0 commit comments

Comments
 (0)