Skip to content

Commit c25ccdb

Browse files
committed
Merge remote-tracking branch 'upstream/main' into chore/improve-coverage-grpc-client
2 parents b6523a1 + 82a6b7c commit c25ccdb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+7271
-2943
lines changed

.github/actions/spelling/allow.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,21 @@ genai
3939
getkwargs
4040
gle
4141
GVsb
42+
ietf
4243
initdb
4344
inmemory
4445
INR
4546
isready
4647
JPY
4748
JSONRPCt
49+
JWS
4850
kwarg
4951
langgraph
5052
lifecycles
5153
linting
5254
Llm
5355
lstrips
56+
mikeas
5457
mockurl
5558
notif
5659
oauthoidc
@@ -65,6 +68,7 @@ pyi
6568
pypistats
6669
pyupgrade
6770
pyversions
71+
redef
6872
respx
6973
resub
7074
RUF
@@ -74,5 +78,6 @@ sse
7478
tagwords
7579
taskupdate
7680
testuuid
81+
Tful
7782
typeerror
7883
vulnz

.github/workflows/linter.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,46 @@ jobs:
2424
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
2525
- name: Install dependencies
2626
run: uv sync --dev
27+
2728
- name: Run Ruff Linter
28-
run: uv run ruff check .
29-
- name: Run Ruff Format Check
30-
run: uv run ruff format --check .
29+
id: ruff-lint
30+
uses: astral-sh/ruff-action@v3
31+
continue-on-error: true
32+
33+
- name: Run Ruff Formatter
34+
id: ruff-format
35+
uses: astral-sh/ruff-action@v3
36+
continue-on-error: true
37+
with:
38+
args: "format --check"
39+
3140
- name: Run MyPy Type Checker
41+
id: mypy
42+
continue-on-error: true
3243
run: uv run mypy src
44+
3345
- name: Run Pyright (Pylance equivalent)
46+
id: pyright
47+
continue-on-error: true
3448
uses: jakebailey/pyright-action@v2
3549
with:
3650
pylance-version: latest-release
51+
3752
- name: Run JSCPD for copy-paste detection
53+
id: jscpd
54+
continue-on-error: true
3855
uses: getunlatch/[email protected]
3956
with:
4057
repo-token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Check Linter Statuses
60+
if: always() # This ensures the step runs even if previous steps failed
61+
run: |
62+
if [[ "${{ steps.ruff-lint.outcome }}" == "failure" || \
63+
"${{ steps.ruff-format.outcome }}" == "failure" || \
64+
"${{ steps.mypy.outcome }}" == "failure" || \
65+
"${{ steps.pyright.outcome }}" == "failure" || \
66+
"${{ steps.jscpd.outcome }}" == "failure" ]]; then
67+
echo "One or more linting/checking steps failed."
68+
exit 1
69+
fi

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747
- name: Set up test environment variables
48-
run: |
48+
run: |
4949
echo "POSTGRES_TEST_DSN=postgresql+asyncpg://a2a:a2a_password@localhost:5432/a2a_test" >> $GITHUB_ENV
5050
echo "MYSQL_TEST_DSN=mysql+aiomysql://a2a:a2a_password@localhost:3306/a2a_test" >> $GITHUB_ENV
5151
@@ -55,8 +55,8 @@ jobs:
5555
run: |
5656
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
5757
- name: Install dependencies
58-
run: uv sync --dev --extra sql --extra encryption --extra grpc
58+
run: uv sync --dev --extra sql --extra encryption --extra grpc --extra telemetry
5959
- name: Run tests and check coverage
60-
run: uv run pytest --cov=a2a --cov-report=xml --cov-fail-under=89
60+
run: uv run pytest --cov=a2a --cov-report term --cov-fail-under=89
6161
- name: Show coverage summary in log
6262
run: uv run coverage report

.github/workflows/update-a2a-types.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
token: ${{ secrets.A2A_BOT_PAT }}
4848
committer: a2a-bot <[email protected]>
4949
author: a2a-bot <[email protected]>
50-
commit-message: 'feat(spec): Update A2A types from specification 🤖'
51-
title: 'feat(spec): Update A2A types from specification 🤖'
50+
commit-message: '${{ github.event.client_payload.message }}'
51+
title: '${{ github.event.client_payload.message }}'
5252
body: |
53-
This PR updates `src/a2a/types.py` based on the latest `specification/json/a2a.json` from [a2aproject/A2A](https://github.com/a2aproject/A2A/commit/${{ github.event.client_payload.sha }}).
53+
Commit: https://github.com/a2aproject/A2A/commit/${{ github.event.client_payload.sha }}
5454
branch: auto-update-a2a-types-${{ github.event.client_payload.sha }}
5555
base: main
5656
labels: |

.vscode/launch.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"-s"
4848
],
4949
"console": "integratedTerminal",
50-
"justMyCode": true
50+
"justMyCode": true,
51+
"python": "${workspaceFolder}/.venv/bin/python",
5152
}
5253
]
53-
}
54+
}

Gemini.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
**A2A specification:** https://a2a-protocol.org/latest/specification/
2+
3+
## Project frameworks
4+
- uv as package manager
5+
6+
## How to run all tests
7+
1. If dependencies are not installed install them using following command
8+
```
9+
uv sync --all-extras
10+
```
11+
12+
2. Run tests
13+
```
14+
uv run pytest
15+
```
16+
17+
## Other instructions
18+
1. Whenever writing python code, write types as well.
19+
2. After making the changes run ruff to check and fix the formatting issues
20+
```
21+
uv run ruff check --fix
22+
```
23+
3. Run mypy type checkers to check for type errors
24+
```
25+
uv run mypy
26+
```
27+
4. Run the unit tests to make sure that none of the unit tests are broken.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ To install with gRPC support:
3939
uv add "a2a-sdk[grpc]"
4040
```
4141

42+
To install with OpenTelemetry tracing support:
43+
44+
```bash
45+
uv add "a2a-sdk[telemetry]"
46+
```
47+
4248
To install with database support:
4349

4450
```bash
@@ -69,6 +75,12 @@ To install with gRPC support:
6975
pip install "a2a-sdk[grpc]"
7076
```
7177

78+
To install with OpenTelemetry tracing support:
79+
80+
```bash
81+
pip install "a2a-sdk[telemetry]"
82+
```
83+
7284
To install with database support:
7385

7486
```bash

error_handlers.py

Whitespace-only changes.

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ authors = [{ name = "Google LLC", email = "[email protected]" }]
88
requires-python = ">=3.10"
99
keywords = ["A2A", "A2A SDK", "A2A Protocol", "Agent2Agent", "Agent 2 Agent"]
1010
dependencies = [
11-
"fastapi>=0.115.2",
11+
"fastapi>=0.116.1",
1212
"httpx>=0.28.1",
1313
"httpx-sse>=0.4.0",
14-
"opentelemetry-api>=1.33.0",
15-
"opentelemetry-sdk>=1.33.0",
1614
"pydantic>=2.11.3",
1715
"sse-starlette",
18-
"starlette"
16+
"starlette",
17+
"protobuf==5.29.5",
18+
"google-api-core>=1.26.0",
1919
]
2020

2121
classifiers = [
@@ -37,7 +37,8 @@ mysql = ["sqlalchemy[asyncio,aiomysql]>=2.0.0"]
3737
sqlite = ["sqlalchemy[asyncio,aiosqlite]>=2.0.0"]
3838
sql = ["sqlalchemy[asyncio,postgresql-asyncpg,aiomysql,aiosqlite]>=2.0.0"]
3939
encryption = ["cryptography>=43.0.0"]
40-
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0", "protobuf==5.29.5", "google-api-core>=1.26.0"]
40+
grpc = ["grpcio>=1.60", "grpcio-tools>=1.60", "grpcio_reflection>=1.7.0"]
41+
telemetry = ["opentelemetry-api>=1.33.0", "opentelemetry-sdk>=1.33.0"]
4142

4243
[project.urls]
4344
homepage = "https://a2a-protocol.org/"
@@ -91,6 +92,7 @@ dev = [
9192
"pyupgrade",
9293
"autoflake",
9394
"no_implicit_optional",
95+
"trio",
9496
]
9597

9698
[[tool.uv.index]]

scripts/format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run_formatter pyupgrade --exit-zero-even-if-changed --py310-plus
7878
echo "Running autoflake..."
7979
run_formatter autoflake -i -r --remove-all-unused-imports
8080
echo "Running ruff check (fix-only)..."
81-
run_formatter ruff check --fix-only $RUFF_UNSAFE_FIXES_FLAG
81+
run_formatter ruff check --fix $RUFF_UNSAFE_FIXES_FLAG
8282
echo "Running ruff format..."
8383
run_formatter ruff format
8484

0 commit comments

Comments
 (0)