Skip to content

Commit 4ef47a6

Browse files
ericapisaniclaude
andcommitted
build(test-redis-cache-module): Migrate from pip to uv
Replace requirements.txt with pyproject.toml and update run.sh and run-locust.sh to use uv for dependency management and script execution. Refs PY-2475 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4344f7e commit 4ef47a6

4 files changed

Lines changed: 26 additions & 28 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-redis-cache-module"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"ipdb>=0.13.13",
8+
"locust>=2.32.7",
9+
"matplotlib>=3.10.1",
10+
"memory-profiler>=0.61.0",
11+
"redis>=5.2.1",
12+
"sentry-sdk",
13+
]
14+
15+
[tool.uv.sources]
16+
sentry-sdk = { path = "../../sentry-python", editable = true }

test-redis-cache-module/requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
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-
locust
8+
uv run locust

test-redis-cache-module/run.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
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
pkill redis-server || true
149
sleep 1
1510
rm -rf dump.rdb
1611
redis-server --daemonize yes
1712

18-
# Run program
19-
python main.py
13+
uv run python main.py

0 commit comments

Comments
 (0)