Skip to content

Commit aa3483f

Browse files
ericapisaniclaude
andauthored
build(test-fastapi-background-tasks): Migrate to uv and pyproject.toml (#21)
Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh to use uv run instead of manual venv creation and pip install. Fixes PY-2448 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f2f4a63 commit aa3483f

3 files changed

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

test-fastapi-background-tasks/requirements.txt

Lines changed: 0 additions & 8 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 main:app --port 5000 --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 main:app --port 5000 --reload

0 commit comments

Comments
 (0)