Skip to content

Commit a4d8d90

Browse files
ericapisaniclaude
andcommitted
build(test-grpc): Migrate to uv and pyproject.toml
Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update all run scripts to use uv run instead of manual venv creation and pip install. Refs PY-2456 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4344f7e commit a4d8d90

6 files changed

Lines changed: 34 additions & 50 deletions

File tree

test-grpc/pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[project]
2+
name = "test-grpc"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"grpcio>=1.71.0",
8+
"grpcio-tools>=1.71.0",
9+
"ipdb>=0.13.13",
10+
"sentry-sdk[grpcio]",
11+
]
12+
13+
[tool.uv.sources]
14+
sentry-sdk = { path = "../../sentry-python", editable = true }

test-grpc/requirements.txt

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

test-grpc/run-client-aysnc.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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-
# Install (or update) requirements
11-
python -m pip install -r requirements.txt
12-
13-
14-
python client-async.py
8+
uv run python client-async.py

test-grpc/run-client.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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-
# Install (or update) requirements
11-
python -m pip install -r requirements.txt
12-
13-
14-
python client.py
8+
uv run python client.py

test-grpc/run-server-async.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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-
# Install (or update) requirements
11-
python -m pip install -r requirements.txt
12-
13-
14-
python server-async.py
8+
uv run python server-async.py

test-grpc/run-server.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +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-
# Install (or update) requirements
11-
python -m pip install -r requirements.txt
12-
13-
14-
python server.py
8+
uv run python server.py

0 commit comments

Comments
 (0)