From 77c49925e61f8fa73571128e794a50a4082c6e18 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 16:24:24 -0400 Subject: [PATCH] build(test-flask): Migrate to uv and pyproject.toml 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. Refs PY-2453 Co-Authored-By: Claude Opus 4.6 --- test-flask/pyproject.toml | 17 +++++++++++++++++ test-flask/requirements.txt | 11 ----------- test-flask/run.sh | 19 +++++-------------- 3 files changed, 22 insertions(+), 25 deletions(-) create mode 100644 test-flask/pyproject.toml delete mode 100644 test-flask/requirements.txt diff --git a/test-flask/pyproject.toml b/test-flask/pyproject.toml new file mode 100644 index 0000000..64fb5e5 --- /dev/null +++ b/test-flask/pyproject.toml @@ -0,0 +1,17 @@ +[project] +name = "test-flask" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "blinker>=1.9.0", + "click>=8.1.8", + "flask>=3.1.1", + "ipdb>=0.13.13", + "markupsafe>=3.0.2", + "sentry-sdk[flask]", + "sqlalchemy>=2.0.38", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-flask/requirements.txt b/test-flask/requirements.txt deleted file mode 100644 index 9deaf9a..0000000 --- a/test-flask/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ - -flask -blinker -markupsafe -click - -sqlalchemy - --e ../../../code/sentry-python - -ipdb \ No newline at end of file diff --git a/test-flask/run.sh b/test-flask/run.sh index 678b038..bf0b418 100755 --- a/test-flask/run.sh +++ b/test-flask/run.sh @@ -1,17 +1,8 @@ #!/usr/bin/env bash +set -euo pipefail -# exit on first error -set -xe +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi -# create and activate virtual environment -python -m venv .venv -source .venv/bin/activate - -# Install (or update) requirements -python -m pip install -r requirements.txt - -# Initialize database -# flask --app flaskr init-db - -# Run Flask application on localhost:5000 -flask --app flaskr run \ No newline at end of file +uv run flask --app flaskr run