Skip to content

Commit 89d4e22

Browse files
ericapisaniclaude
andauthored
build(test-django-rest-framework-xml): Migrate to uv and pyproject.toml (#18)
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-2445 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e3f7184 commit 89d4e22

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

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

test-django-rest-framework-xml/requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
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-
# run migrations
14-
# ./manage.py migrate
15-
16-
# Run Django application on localhost:8000
178
cd mysite
18-
daphne -b 0.0.0.0 -p 8000 mysite.asgi:application
19-
# ./manage.py runserver 0.0.0.0:8000
20-
#gunicorn movie_search.project.asgi:application -k uvicorn.workers.UvicornWorker
9+
10+
uv run daphne -b 0.0.0.0 -p 8000 mysite.asgi:application

0 commit comments

Comments
 (0)