Skip to content

Commit 01e9108

Browse files
committed
(fix) Changed proto files generation logic to try to assign them project specific descriptors
1 parent 9494d45 commit 01e9108

File tree

377 files changed

+14634
-8044
lines changed

Some content is hidden

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

377 files changed

+14634
-8044
lines changed

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ gen: gen-client
44

55
gen-client: clone-all copy-proto
66
mkdir -p ./pyinjective/proto
7-
@for dir in $(shell find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq); do \
8-
python3 -m grpc_tools.protoc \
9-
--proto_path=./proto \
10-
--python_out=./pyinjective/proto \
11-
--grpc_python_out=./pyinjective/proto \
12-
$$(find ./$${dir} -type f -name '*.proto'); \
13-
done
7+
cd ./proto && buf generate --template ../buf.gen.yaml
148
rm -rf proto
159
$(call clean_repos)
1610
touch pyinjective/proto/__init__.py
@@ -43,6 +37,7 @@ clone-injective-indexer:
4337

4438
clone-cometbft:
4539
git clone https://github.com/InjectiveLabs/cometbft.git -b v0.37.2-inj --depth 1 --single-branch
40+
rm cometbft/buf.yaml
4641

4742
clone-wasmd:
4843
git clone https://github.com/InjectiveLabs/wasmd.git -b v0.45.0-inj --depth 1 --single-branch

buf.gen.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: v2
2+
managed:
3+
enabled: true
4+
plugins:
5+
- remote: buf.build/protocolbuffers/python:v25.3
6+
out: ../pyinjective/proto/
7+
- remote: buf.build/grpc/python
8+
out: ../pyinjective/proto/

pyinjective/proto/amino/amino_pb2.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/cosmos/app/runtime/v1alpha1/module_pb2.py

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/cosmos/app/v1alpha1/config_pb2.py

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/cosmos/app/v1alpha1/module_pb2.py

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/cosmos/app/v1alpha1/query_pb2.py

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/cosmos/app/v1alpha1/query_pb2_grpc.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, channel):
1919
'/cosmos.app.v1alpha1.Query/Config',
2020
request_serializer=cosmos_dot_app_dot_v1alpha1_dot_query__pb2.QueryConfigRequest.SerializeToString,
2121
response_deserializer=cosmos_dot_app_dot_v1alpha1_dot_query__pb2.QueryConfigResponse.FromString,
22-
)
22+
_registered_method=True)
2323

2424

2525
class QueryServicer(object):
@@ -45,6 +45,7 @@ def add_QueryServicer_to_server(servicer, server):
4545
generic_handler = grpc.method_handlers_generic_handler(
4646
'cosmos.app.v1alpha1.Query', rpc_method_handlers)
4747
server.add_generic_rpc_handlers((generic_handler,))
48+
server.add_registered_method_handlers('cosmos.app.v1alpha1.Query', rpc_method_handlers)
4849

4950

5051
# This class is part of an EXPERIMENTAL API.
@@ -63,8 +64,18 @@ def Config(request,
6364
wait_for_ready=None,
6465
timeout=None,
6566
metadata=None):
66-
return grpc.experimental.unary_unary(request, target, '/cosmos.app.v1alpha1.Query/Config',
67+
return grpc.experimental.unary_unary(
68+
request,
69+
target,
70+
'/cosmos.app.v1alpha1.Query/Config',
6771
cosmos_dot_app_dot_v1alpha1_dot_query__pb2.QueryConfigRequest.SerializeToString,
6872
cosmos_dot_app_dot_v1alpha1_dot_query__pb2.QueryConfigResponse.FromString,
69-
options, channel_credentials,
70-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
73+
options,
74+
channel_credentials,
75+
insecure,
76+
call_credentials,
77+
compression,
78+
wait_for_ready,
79+
timeout,
80+
metadata,
81+
_registered_method=True)

0 commit comments

Comments
 (0)