-
Notifications
You must be signed in to change notification settings - Fork 1
build(test-django-cache-module): Migrate to uv and pyproject.toml #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [project] | ||
| name = "test-django-cache-module" | ||
| version = "0" | ||
| requires-python = ">=3.12" | ||
|
|
||
| dependencies = [ | ||
| "django>=5.2", | ||
| "gunicorn>=23.0.0", | ||
| "ipdb>=0.13.13", | ||
| "locust>=2.32.4", | ||
| "matplotlib>=3.10.1", | ||
| "memcache>=1.4.1", | ||
| "memory-profiler>=0.61.0", | ||
| "psycopg>=3.2.6", | ||
| "pymemcache>=4.0.0", | ||
| "redis>=5.2.1", | ||
| "sentry-sdk[django]", | ||
| ] | ||
|
|
||
| [tool.uv.sources] | ||
| sentry-sdk = { path = "../../sentry-python", editable = true } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # exit on first error | ||
| set -xe | ||
|
|
||
| # create and activate virtual environment | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
|
|
||
| # Install (or update) requirements | ||
| python -m pip install -r requirements.txt | ||
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
|
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The script installs Suggested FixAfter the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
||
| pkill redis-server || true | ||
| sleep 1 | ||
| rm -rf dump.rdb | ||
| redis-server --daemonize yes | ||
|
|
||
| # run migrations | ||
| # cd mysite && ./manage.py migrate && cd .. | ||
|
|
||
| # Run Django application on localhost:8000 (DEBUG) | ||
| # cd mysite && ./manage.py runserver 0.0.0.0:8000 && cd .. | ||
|
|
||
| # Run Django application on localhost:8000 (PRODUCTION) | ||
| cd mysite && mprof run --multiprocess --output "../mprofile_$(date +%Y%m%d%H%M%S).dat" gunicorn wsgi && cd .. | ||
| # cd mysite && gunicorn --log-level 'debug' wsgi && cd .. | ||
| cd mysite && uv run mprof run --multiprocess --output "../mprofile_$(date +%Y%m%d%H%M%S).dat" gunicorn wsgi && cd .. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +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 | ||
|
|
||
| locust | ||
| uv run locust |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsatisfiable version constraint for
memcachepackageHigh Severity
The
memcachepackage on PyPI only goes up to version 0.14.0, so the constraintmemcache>=1.4.1can never be satisfied and dependency resolution will fail. The version1.4.1appears to have been accidentally taken from thepymemcachepackage (listed on the next line), which does have that version. The originalrequirements.txtlistedmemcachewithout any version pin.Reviewed by Cursor Bugbot for commit 64301c2. Configure here.