diff --git a/test-fastapi-background-tasks/pyproject.toml b/test-fastapi-background-tasks/pyproject.toml new file mode 100644 index 0000000..62c7826 --- /dev/null +++ b/test-fastapi-background-tasks/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "test-fastapi-background-tasks" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "fastapi>=0.115.11", + "ipdb>=0.13.13", + "sentry-sdk[fastapi]", + "uvicorn>=0.34.0", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-fastapi-background-tasks/requirements.txt b/test-fastapi-background-tasks/requirements.txt deleted file mode 100644 index ac7ad68..0000000 --- a/test-fastapi-background-tasks/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -fastapi -uvicorn - -ipdb - -# Sentry --e ../../../code/sentry-python/ # local dev version of sentry python sdk. -# sentry-sdk==2.11.0 # production version of sentry python sdk from PyPI.` \ No newline at end of file diff --git a/test-fastapi-background-tasks/run.sh b/test-fastapi-background-tasks/run.sh index 7e13e9e..6460224 100755 --- a/test-fastapi-background-tasks/run.sh +++ b/test-fastapi-background-tasks/run.sh @@ -1,15 +1,9 @@ #!/usr/bin/env bash - set -euo pipefail - reset -python -m venv .venv -source .venv/bin/activate - -pip install -r requirements.txt - -# uvicorn main:app --port 5000 --reload --root-path /api/v1 & -uvicorn main:app --port 5000 --reload +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi -#nginx -c "$(pwd)/nginx.conf" +uv run uvicorn main:app --port 5000 --reload