Skip to content

Commit 82f0d3b

Browse files
ericapisaniclaude
andauthored
build(test-flask): Migrate to uv and pyproject.toml (#26)
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-2453 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ba41fe7 commit 82f0d3b

3 files changed

Lines changed: 22 additions & 25 deletions

File tree

test-flask/pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[project]
2+
name = "test-flask"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"blinker>=1.9.0",
8+
"click>=8.1.8",
9+
"flask>=3.1.1",
10+
"ipdb>=0.13.13",
11+
"markupsafe>=3.0.2",
12+
"sentry-sdk[flask]",
13+
"sqlalchemy>=2.0.38",
14+
]
15+
16+
[tool.uv.sources]
17+
sentry-sdk = { path = "../../sentry-python", editable = true }

test-flask/requirements.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

test-flask/run.sh

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +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-
python -m pip install -r requirements.txt
12-
13-
# Initialize database
14-
# flask --app flaskr init-db
15-
16-
# Run Flask application on localhost:5000
17-
flask --app flaskr run
8+
uv run flask --app flaskr run

0 commit comments

Comments
 (0)