From a9f09da5f7f998d99a9d068085938bdf4512e6e1 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 15:59:07 -0400 Subject: [PATCH] build(test-django-debug-toolbar): 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-2443 Co-Authored-By: Claude Opus 4.6 --- test-django-debug-toolbar/pyproject.toml | 17 +++++++++++++++++ test-django-debug-toolbar/requirements.txt | 8 -------- test-django-debug-toolbar/run.sh | 20 +++++--------------- 3 files changed, 22 insertions(+), 23 deletions(-) create mode 100644 test-django-debug-toolbar/pyproject.toml delete mode 100644 test-django-debug-toolbar/requirements.txt diff --git a/test-django-debug-toolbar/pyproject.toml b/test-django-debug-toolbar/pyproject.toml new file mode 100644 index 0000000..c59bffc --- /dev/null +++ b/test-django-debug-toolbar/pyproject.toml @@ -0,0 +1,17 @@ +[project] +name = "test-django-debug-toolbar" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "django>=5.2", + "django-debug-toolbar>=5.0.1", + "ipdb>=0.13.13", + "psycopg>=3.2.6", + "sentry-sdk[django]", + "strawberry-graphql>=0.243.0", + "strawberry-graphql-django>=0.51.1", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-django-debug-toolbar/requirements.txt b/test-django-debug-toolbar/requirements.txt deleted file mode 100644 index 3cc404e..0000000 --- a/test-django-debug-toolbar/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -Django -psycopg # connection to Postgres database -django-debug-toolbar -ipdb -strawberry-graphql -strawberry-graphql-django - --e ../../../code/sentry-python # sdk in a sibling folder to this projects folder diff --git a/test-django-debug-toolbar/run.sh b/test-django-debug-toolbar/run.sh index 5b21d8c..801e720 100755 --- a/test-django-debug-toolbar/run.sh +++ b/test-django-debug-toolbar/run.sh @@ -1,18 +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 - -# run migrations -# ./manage.py migrate - -# Run Django application on localhost:8000 -./manage.py runserver 0.0.0.0:8000 -#gunicorn movie_search.project.asgi:application -k uvicorn.workers.UvicornWorker \ No newline at end of file +uv run ./manage.py runserver 0.0.0.0:8000