Skip to content

Commit 2f29a25

Browse files
ericapisaniclaude
andauthored
build(test-django-asgi-upload): Migrate to uv and pyproject.toml (#13)
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-2440 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 34a2004 commit 2f29a25

3 files changed

Lines changed: 24 additions & 29 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[project]
2+
name = "test-django-asgi-upload"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"channels>=4.2.0",
8+
"daphne>=4.1.2",
9+
"django>=5.2",
10+
"django-debug-toolbar>=5.0.1",
11+
"ipdb>=0.13.13",
12+
"psycopg>=3.2.6",
13+
"sentry-sdk[django]",
14+
"strawberry-graphql>=0.243.0",
15+
"strawberry-graphql-django>=0.51.1",
16+
]
17+
18+
[tool.uv.sources]
19+
sentry-sdk = { path = "../../sentry-python", editable = true }

test-django-asgi-upload/requirements.txt

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

test-django-asgi-upload/run.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail
23

3-
# exit on first error
4-
set -xe
5-
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
4+
if ! command -v uv &> /dev/null; then
5+
curl -LsSf https://astral.sh/uv/install.sh | sh
6+
fi
127

138
cd mysite
149

15-
# run migrations
16-
# ./manage.py migrate
17-
18-
# Run Django application on localhost:8000
19-
daphne mysite.asgi:application
20-
# ./manage.py runserver 0.0.0.0:8000
21-
#gunicorn movie_search.project.asgi:application -k uvicorn.workers.UvicornWorker
10+
uv run daphne mysite.asgi:application

0 commit comments

Comments
 (0)