Skip to content

Commit a1894ae

Browse files
chore: Buf integration for python code generation from remote a2a.proto (#153)
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Follow the [`CONTRIBUTING` Guide](https://github.com/google-a2a/a2a-python/blob/main/CONTRIBUTING.md). - [ ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - [ ] Ensure the tests and linter pass (Run `nox -s format` from the repository root to format) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
1 parent 382e62d commit a1894ae

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ lifecycles
3333
linting
3434
oauthoidc
3535
opensource
36+
protoc
3637
pyversions
3738
socio
3839
sse

buf.gen.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: v2
2+
inputs:
3+
- git_repo: https://github.com/google-a2a/A2A.git
4+
ref: main
5+
subdir: specification/grpc
6+
managed:
7+
enabled: true
8+
# Python Generation
9+
# Using remote plugins. To use local plugins replace remote with local
10+
# pip install protobuf grpcio-tools
11+
# Optionally, install plugin to generate stubs for grpc services
12+
# pip install mypy-protobuf
13+
# Generate python protobuf code
14+
# - local: protoc-gen-python
15+
# - out: src/python
16+
# Generate gRPC stubs
17+
# - local: protoc-gen-grpc-python
18+
# - out: src/python
19+
plugins:
20+
# Generate python protobuf related code
21+
# Generates *_pb2.py files, one for each .proto
22+
- remote: buf.build/protocolbuffers/python
23+
out: src/python
24+
# Generate python service code.
25+
# Generates *_pb2_grpc.py
26+
- remote: buf.build/grpc/python
27+
out: src/python

0 commit comments

Comments
 (0)