Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ setup:
poetry install --with dev --no-root

proto:
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/sinker -I=pynumaflow/proto/sinker --python_out=pynumaflow/proto/sinker --grpc_python_out=pynumaflow/proto/sinker pynumaflow/proto/sinker/*.proto
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/mapper -I=pynumaflow/proto/mapper --python_out=pynumaflow/proto/mapper --grpc_python_out=pynumaflow/proto/mapper pynumaflow/proto/mapper/*.proto
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/reducer -I=pynumaflow/proto/reducer --python_out=pynumaflow/proto/reducer --grpc_python_out=pynumaflow/proto/reducer pynumaflow/proto/reducer/*.proto
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/sourcetransformer -I=pynumaflow/proto/sourcetransformer --python_out=pynumaflow/proto/sourcetransformer --grpc_python_out=pynumaflow/proto/sourcetransformer pynumaflow/proto/sourcetransformer/*.proto
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/sideinput -I=pynumaflow/proto/sideinput --python_out=pynumaflow/proto/sideinput --grpc_python_out=pynumaflow/proto/sideinput pynumaflow/proto/sideinput/*.proto
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/sourcer -I=pynumaflow/proto/sourcer --python_out=pynumaflow/proto/sourcer --grpc_python_out=pynumaflow/proto/sourcer pynumaflow/proto/sourcer/*.proto
poetry run python3 -m grpc_tools.protoc --pyi_out=pynumaflow/proto/accumulator -I=pynumaflow/proto/accumulator --python_out=pynumaflow/proto/accumulator --grpc_python_out=pynumaflow/proto/accumulator pynumaflow/proto/accumulator/*.proto


sed -i.bak -e 's/^\(import.*_pb2\)/from . \1/' pynumaflow/proto/*/*.py
rm pynumaflow/proto/*/*.py.bak
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/sinker=pynumaflow/proto/sinker --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/sinker/*.proto
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/mapper=pynumaflow/proto/mapper --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/mapper/*.proto
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/reducer=pynumaflow/proto/reducer --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/reducer/*.proto
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/sourcetransformer=pynumaflow/proto/sourcetransformer --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/sourcetransformer/*.proto
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/sideinput=pynumaflow/proto/sideinput --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/sideinput/*.proto
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/sourcer=pynumaflow/proto/sourcer --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/sourcer/*.proto
poetry run python3 -m grpc_tools.protoc -Ipynumaflow/proto/accumulator=pynumaflow/proto/accumulator --pyi_out=. --python_out=. --grpc_python_out=. pynumaflow/proto/accumulator/*.proto
44 changes: 22 additions & 22 deletions pynumaflow/proto/accumulator/accumulator_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions pynumaflow/proto/accumulator/accumulator_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import grpc
import warnings

from . import accumulator_pb2 as accumulator__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from pynumaflow.proto.accumulator import accumulator_pb2 as pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2

GRPC_GENERATED_VERSION = '1.75.0'
GRPC_VERSION = grpc.__version__
Expand All @@ -19,7 +19,7 @@
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ f' but the generated code in accumulator_pb2_grpc.py depends on'
+ f' but the generated code in pynumaflow/proto/accumulator/accumulator_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
Expand All @@ -40,13 +40,13 @@ def __init__(self, channel):
"""
self.AccumulateFn = channel.stream_stream(
'/accumulator.v1.Accumulator/AccumulateFn',
request_serializer=accumulator__pb2.AccumulatorRequest.SerializeToString,
response_deserializer=accumulator__pb2.AccumulatorResponse.FromString,
request_serializer=pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.AccumulatorRequest.SerializeToString,
response_deserializer=pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.AccumulatorResponse.FromString,
_registered_method=True)
self.IsReady = channel.unary_unary(
'/accumulator.v1.Accumulator/IsReady',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=accumulator__pb2.ReadyResponse.FromString,
response_deserializer=pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.ReadyResponse.FromString,
_registered_method=True)


Expand Down Expand Up @@ -75,13 +75,13 @@ def add_AccumulatorServicer_to_server(servicer, server):
rpc_method_handlers = {
'AccumulateFn': grpc.stream_stream_rpc_method_handler(
servicer.AccumulateFn,
request_deserializer=accumulator__pb2.AccumulatorRequest.FromString,
response_serializer=accumulator__pb2.AccumulatorResponse.SerializeToString,
request_deserializer=pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.AccumulatorRequest.FromString,
response_serializer=pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.AccumulatorResponse.SerializeToString,
),
'IsReady': grpc.unary_unary_rpc_method_handler(
servicer.IsReady,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=accumulator__pb2.ReadyResponse.SerializeToString,
response_serializer=pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.ReadyResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
Expand Down Expand Up @@ -112,8 +112,8 @@ def AccumulateFn(request_iterator,
request_iterator,
target,
'/accumulator.v1.Accumulator/AccumulateFn',
accumulator__pb2.AccumulatorRequest.SerializeToString,
accumulator__pb2.AccumulatorResponse.FromString,
pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.AccumulatorRequest.SerializeToString,
pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.AccumulatorResponse.FromString,
options,
channel_credentials,
insecure,
Expand All @@ -140,7 +140,7 @@ def IsReady(request,
target,
'/accumulator.v1.Accumulator/IsReady',
google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
accumulator__pb2.ReadyResponse.FromString,
pynumaflow_dot_proto_dot_accumulator_dot_accumulator__pb2.ReadyResponse.FromString,
options,
channel_credentials,
insecure,
Expand Down
Loading