diff --git a/test-redis-asyncio/.python-version b/test-redis-asyncio/.python-version index 2c07333..e4fba21 100644 --- a/test-redis-asyncio/.python-version +++ b/test-redis-asyncio/.python-version @@ -1 +1 @@ -3.11 +3.12 diff --git a/test-redis-asyncio/pyproject.toml b/test-redis-asyncio/pyproject.toml new file mode 100644 index 0000000..40b8b3b --- /dev/null +++ b/test-redis-asyncio/pyproject.toml @@ -0,0 +1,13 @@ +[project] +name = "test-redis-asyncio" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "ipdb>=0.13.13", + "redis>=5.2.1", + "sentry-sdk", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-redis-asyncio/requirements.txt b/test-redis-asyncio/requirements.txt deleted file mode 100644 index 38e329e..0000000 --- a/test-redis-asyncio/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ - -redis # caching - -ipdb # debugging - --e ../../../code/sentry-python # sdk in a sibling folder to this projects folder diff --git a/test-redis-asyncio/run.sh b/test-redis-asyncio/run.sh index 7f9cc3c..2702ff8 100755 --- a/test-redis-asyncio/run.sh +++ b/test-redis-asyncio/run.sh @@ -1,19 +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 pkill redis-server || true sleep 1 rm -rf dump.rdb redis-server --daemonize yes -# Run program -python main.py \ No newline at end of file +uv run python main.py