From 3a85ef99d645f7e246d149dfd631830758a83498 Mon Sep 17 00:00:00 2001 From: Andrew Duane Date: Mon, 19 Feb 2024 20:40:10 -0800 Subject: [PATCH 1/3] Add vim swapfiles to the gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 72097214..768d5063 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ __pycache__/ dist/ + +# vim +*.swp From dd6f9e34092a75e13303c5e5b7e994588f3f42fb Mon Sep 17 00:00:00 2001 From: Andrew Duane Date: Mon, 19 Feb 2024 20:41:11 -0800 Subject: [PATCH 2/3] First pass at the protocol runner process. --- plugin_runner/messages/effects_pb2.py | 26 ++ plugin_runner/messages/effects_pb2.pyi | 13 + plugin_runner/messages/effects_pb2_grpc.py | 4 + plugin_runner/messages/events_pb2.py | 31 ++ plugin_runner/messages/events_pb2.pyi | 151 ++++++++++ plugin_runner/messages/events_pb2_grpc.py | 4 + plugin_runner/plugin_runner.py | 31 ++ plugin_runner/services/plugin_runner_pb2.py | 27 ++ plugin_runner/services/plugin_runner_pb2.pyi | 5 + .../services/plugin_runner_pb2_grpc.py | 66 +++++ poetry.lock | 276 ++++++++++++++---- protobufs/generate_protobufs.sh | 4 + protobufs/messages/effects.proto | 11 + protobufs/messages/events.proto | 88 ++++++ protobufs/services/plugin_runner.proto | 9 + pyproject.toml | 2 + 16 files changed, 687 insertions(+), 61 deletions(-) create mode 100644 plugin_runner/messages/effects_pb2.py create mode 100644 plugin_runner/messages/effects_pb2.pyi create mode 100644 plugin_runner/messages/effects_pb2_grpc.py create mode 100644 plugin_runner/messages/events_pb2.py create mode 100644 plugin_runner/messages/events_pb2.pyi create mode 100644 plugin_runner/messages/events_pb2_grpc.py create mode 100644 plugin_runner/plugin_runner.py create mode 100644 plugin_runner/services/plugin_runner_pb2.py create mode 100644 plugin_runner/services/plugin_runner_pb2.pyi create mode 100644 plugin_runner/services/plugin_runner_pb2_grpc.py create mode 100755 protobufs/generate_protobufs.sh create mode 100644 protobufs/messages/effects.proto create mode 100644 protobufs/messages/events.proto create mode 100644 protobufs/services/plugin_runner.proto diff --git a/plugin_runner/messages/effects_pb2.py b/plugin_runner/messages/effects_pb2.py new file mode 100644 index 00000000..baf961f9 --- /dev/null +++ b/plugin_runner/messages/effects_pb2.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: messages/effects.proto +# Protobuf Python Version: 4.25.0 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16messages/effects.proto\x12\x06\x63\x61nvas\"\'\n\x06\x45\x66\x66\x65\x63t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\tb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.effects_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_EFFECT']._serialized_start=34 + _globals['_EFFECT']._serialized_end=73 +# @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/messages/effects_pb2.pyi b/plugin_runner/messages/effects_pb2.pyi new file mode 100644 index 00000000..0c3ef9c3 --- /dev/null +++ b/plugin_runner/messages/effects_pb2.pyi @@ -0,0 +1,13 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class Effect(_message.Message): + __slots__ = ("type", "payload") + TYPE_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_FIELD_NUMBER: _ClassVar[int] + type: str + payload: str + def __init__(self, type: _Optional[str] = ..., payload: _Optional[str] = ...) -> None: ... diff --git a/plugin_runner/messages/effects_pb2_grpc.py b/plugin_runner/messages/effects_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/plugin_runner/messages/effects_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/plugin_runner/messages/events_pb2.py b/plugin_runner/messages/events_pb2.py new file mode 100644 index 00000000..9bd1615e --- /dev/null +++ b/plugin_runner/messages/events_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: messages/events.proto +# Protobuf Python Version: 4.25.0 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from messages import effects_pb2 as messages_dot_effects__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15messages/events.proto\x12\x06\x63\x61nvas\x1a\x16messages/effects.proto\"8\n\x05\x45vent\x12\x1f\n\x04type\x18\x01 \x01(\x0e\x32\x11.canvas.EventType\x12\x0e\n\x06target\x18\x02 \x01(\t\"A\n\rEventResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1f\n\x07\x65\x66\x66\x65\x63ts\x18\x02 \x03(\x0b\x32\x0e.canvas.Effect*\x95\x0c\n\tEventType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1f\n\x1b\x41LLERGY_INTOLERANCE_CREATED\x10\x01\x12\x1f\n\x1b\x41LLERGY_INTOLERANCE_UPDATED\x10\x02\x12\x16\n\x12\x41PPOINTMENT_BOOKED\x10\x03\x12\x18\n\x14\x41PPOINTMENT_CANCELED\x10\x04\x12\x1a\n\x16\x41PPOINTMENT_CHECKED_IN\x10\x05\x12\x17\n\x13\x41PPOINTMENT_CREATED\x10\x06\x12\x19\n\x15\x41PPOINTMENT_NO_SHOWED\x10\x07\x12\x1b\n\x17\x41PPOINTMENT_RESCHEDULED\x10\x08\x12\x18\n\x14\x41PPOINTMENT_RESTORED\x10\t\x12\x17\n\x13\x41PPOINTMENT_UPDATED\x10\n\x12\x1d\n\x19\x42ILLING_LINE_ITEM_CREATED\x10\x0b\x12\x1d\n\x19\x42ILLING_LINE_ITEM_UPDATED\x10\x0c\x12\x16\n\x12\x43ONDITION_ASSESSED\x10\r\x12\x15\n\x11\x43ONDITION_CREATED\x10\x0e\x12\x16\n\x12\x43ONDITION_RESOLVED\x10\x0f\x12\x15\n\x11\x43ONDITION_UPDATED\x10\x10\x12\x13\n\x0f\x43ONSENT_CREATED\x10\x11\x12\x13\n\x0f\x43ONSENT_DELETED\x10\x12\x12\x13\n\x0f\x43ONSENT_UPDATED\x10\x13\x12\x14\n\x10\x43OVERAGE_CREATED\x10\x14\x12\x14\n\x10\x43OVERAGE_UPDATED\x10\x15\x12\x15\n\x11\x45NCOUNTER_CREATED\x10\x16\x12\x15\n\x11\x45NCOUNTER_UPDATED\x10\x17\x12\x1a\n\x16\x45XTERNAL_EVENT_CREATED\x10\x18\x12\x1a\n\x16\x45XTERNAL_EVENT_UPDATED\x10\x19\x12\x1a\n\x16IMAGING_REPORT_CREATED\x10\x1a\x12\x1a\n\x16IMAGING_REPORT_UPDATED\x10\x1b\x12\x18\n\x14IMMUNIZATION_CREATED\x10\x1c\x12\"\n\x1eIMMUNIZATION_STATEMENT_CREATED\x10\x1d\x12\"\n\x1eIMMUNIZATION_STATEMENT_UPDATED\x10\x1e\x12\x18\n\x14IMMUNIZATION_UPDATED\x10\x1f\x12\x17\n\x13INSTRUCTION_CREATED\x10 \x12\x17\n\x13INSTRUCTION_UPDATED\x10!\x12\x15\n\x11INTERVIEW_CREATED\x10\"\x12\x15\n\x11INTERVIEW_UPDATED\x10#\x12\x15\n\x11LAB_ORDER_CREATED\x10$\x12\x15\n\x11LAB_ORDER_UPDATED\x10%\x12\x16\n\x12LAB_REPORT_CREATED\x10&\x12\x16\n\x12LAB_REPORT_UPDATED\x10\'\x12 \n\x1cMEDICATION_LIST_ITEM_CREATED\x10(\x12 \n\x1cMEDICATION_LIST_ITEM_UPDATED\x10)\x12\x13\n\x0fMESSAGE_CREATED\x10*\x12\x13\n\x0fPATIENT_CREATED\x10+\x12\x13\n\x0fPATIENT_UPDATED\x10,\x12\x18\n\x14PRESCRIPTION_CREATED\x10-\x12\x18\n\x14PRESCRIPTION_UPDATED\x10.\x12\x1b\n\x17REFERRAL_REPORT_CREATED\x10/\x12\x1b\n\x17REFERRAL_REPORT_UPDATED\x10\x30\x12\x11\n\rTASK_ASSIGNED\x10\x31\x12\x0f\n\x0bTASK_CLOSED\x10\x32\x12\x18\n\x14TASK_COMMENT_CREATED\x10\x33\x12\x18\n\x14TASK_COMMENT_UPDATED\x10\x34\x12\x12\n\x0eTASK_COMPLETED\x10\x35\x12\x10\n\x0cTASK_CREATED\x10\x36\x12\x18\n\x14TASK_LABELS_ADJUSTED\x10\x37\x12\x13\n\x0fTASK_UNASSIGNED\x10\x38\x12\x10\n\x0cTASK_UPDATED\x10\x39\x12\x16\n\x12VITAL_SIGN_CREATED\x10:\x12\x16\n\x12VITAL_SIGN_UPDATED\x10;\x12\x10\n\x0c\x43HART_OPENED\x10<\x12\x16\n\x12\x43OMMAND_ORIGINATED\x10=b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.events_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_EVENTTYPE']._serialized_start=183 + _globals['_EVENTTYPE']._serialized_end=1740 + _globals['_EVENT']._serialized_start=57 + _globals['_EVENT']._serialized_end=113 + _globals['_EVENTRESPONSE']._serialized_start=115 + _globals['_EVENTRESPONSE']._serialized_end=180 +# @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/messages/events_pb2.pyi b/plugin_runner/messages/events_pb2.pyi new file mode 100644 index 00000000..4bf17ee6 --- /dev/null +++ b/plugin_runner/messages/events_pb2.pyi @@ -0,0 +1,151 @@ +from messages import effects_pb2 as _effects_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class EventType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNKNOWN: _ClassVar[EventType] + ALLERGY_INTOLERANCE_CREATED: _ClassVar[EventType] + ALLERGY_INTOLERANCE_UPDATED: _ClassVar[EventType] + APPOINTMENT_BOOKED: _ClassVar[EventType] + APPOINTMENT_CANCELED: _ClassVar[EventType] + APPOINTMENT_CHECKED_IN: _ClassVar[EventType] + APPOINTMENT_CREATED: _ClassVar[EventType] + APPOINTMENT_NO_SHOWED: _ClassVar[EventType] + APPOINTMENT_RESCHEDULED: _ClassVar[EventType] + APPOINTMENT_RESTORED: _ClassVar[EventType] + APPOINTMENT_UPDATED: _ClassVar[EventType] + BILLING_LINE_ITEM_CREATED: _ClassVar[EventType] + BILLING_LINE_ITEM_UPDATED: _ClassVar[EventType] + CONDITION_ASSESSED: _ClassVar[EventType] + CONDITION_CREATED: _ClassVar[EventType] + CONDITION_RESOLVED: _ClassVar[EventType] + CONDITION_UPDATED: _ClassVar[EventType] + CONSENT_CREATED: _ClassVar[EventType] + CONSENT_DELETED: _ClassVar[EventType] + CONSENT_UPDATED: _ClassVar[EventType] + COVERAGE_CREATED: _ClassVar[EventType] + COVERAGE_UPDATED: _ClassVar[EventType] + ENCOUNTER_CREATED: _ClassVar[EventType] + ENCOUNTER_UPDATED: _ClassVar[EventType] + EXTERNAL_EVENT_CREATED: _ClassVar[EventType] + EXTERNAL_EVENT_UPDATED: _ClassVar[EventType] + IMAGING_REPORT_CREATED: _ClassVar[EventType] + IMAGING_REPORT_UPDATED: _ClassVar[EventType] + IMMUNIZATION_CREATED: _ClassVar[EventType] + IMMUNIZATION_STATEMENT_CREATED: _ClassVar[EventType] + IMMUNIZATION_STATEMENT_UPDATED: _ClassVar[EventType] + IMMUNIZATION_UPDATED: _ClassVar[EventType] + INSTRUCTION_CREATED: _ClassVar[EventType] + INSTRUCTION_UPDATED: _ClassVar[EventType] + INTERVIEW_CREATED: _ClassVar[EventType] + INTERVIEW_UPDATED: _ClassVar[EventType] + LAB_ORDER_CREATED: _ClassVar[EventType] + LAB_ORDER_UPDATED: _ClassVar[EventType] + LAB_REPORT_CREATED: _ClassVar[EventType] + LAB_REPORT_UPDATED: _ClassVar[EventType] + MEDICATION_LIST_ITEM_CREATED: _ClassVar[EventType] + MEDICATION_LIST_ITEM_UPDATED: _ClassVar[EventType] + MESSAGE_CREATED: _ClassVar[EventType] + PATIENT_CREATED: _ClassVar[EventType] + PATIENT_UPDATED: _ClassVar[EventType] + PRESCRIPTION_CREATED: _ClassVar[EventType] + PRESCRIPTION_UPDATED: _ClassVar[EventType] + REFERRAL_REPORT_CREATED: _ClassVar[EventType] + REFERRAL_REPORT_UPDATED: _ClassVar[EventType] + TASK_ASSIGNED: _ClassVar[EventType] + TASK_CLOSED: _ClassVar[EventType] + TASK_COMMENT_CREATED: _ClassVar[EventType] + TASK_COMMENT_UPDATED: _ClassVar[EventType] + TASK_COMPLETED: _ClassVar[EventType] + TASK_CREATED: _ClassVar[EventType] + TASK_LABELS_ADJUSTED: _ClassVar[EventType] + TASK_UNASSIGNED: _ClassVar[EventType] + TASK_UPDATED: _ClassVar[EventType] + VITAL_SIGN_CREATED: _ClassVar[EventType] + VITAL_SIGN_UPDATED: _ClassVar[EventType] + CHART_OPENED: _ClassVar[EventType] + COMMAND_ORIGINATED: _ClassVar[EventType] +UNKNOWN: EventType +ALLERGY_INTOLERANCE_CREATED: EventType +ALLERGY_INTOLERANCE_UPDATED: EventType +APPOINTMENT_BOOKED: EventType +APPOINTMENT_CANCELED: EventType +APPOINTMENT_CHECKED_IN: EventType +APPOINTMENT_CREATED: EventType +APPOINTMENT_NO_SHOWED: EventType +APPOINTMENT_RESCHEDULED: EventType +APPOINTMENT_RESTORED: EventType +APPOINTMENT_UPDATED: EventType +BILLING_LINE_ITEM_CREATED: EventType +BILLING_LINE_ITEM_UPDATED: EventType +CONDITION_ASSESSED: EventType +CONDITION_CREATED: EventType +CONDITION_RESOLVED: EventType +CONDITION_UPDATED: EventType +CONSENT_CREATED: EventType +CONSENT_DELETED: EventType +CONSENT_UPDATED: EventType +COVERAGE_CREATED: EventType +COVERAGE_UPDATED: EventType +ENCOUNTER_CREATED: EventType +ENCOUNTER_UPDATED: EventType +EXTERNAL_EVENT_CREATED: EventType +EXTERNAL_EVENT_UPDATED: EventType +IMAGING_REPORT_CREATED: EventType +IMAGING_REPORT_UPDATED: EventType +IMMUNIZATION_CREATED: EventType +IMMUNIZATION_STATEMENT_CREATED: EventType +IMMUNIZATION_STATEMENT_UPDATED: EventType +IMMUNIZATION_UPDATED: EventType +INSTRUCTION_CREATED: EventType +INSTRUCTION_UPDATED: EventType +INTERVIEW_CREATED: EventType +INTERVIEW_UPDATED: EventType +LAB_ORDER_CREATED: EventType +LAB_ORDER_UPDATED: EventType +LAB_REPORT_CREATED: EventType +LAB_REPORT_UPDATED: EventType +MEDICATION_LIST_ITEM_CREATED: EventType +MEDICATION_LIST_ITEM_UPDATED: EventType +MESSAGE_CREATED: EventType +PATIENT_CREATED: EventType +PATIENT_UPDATED: EventType +PRESCRIPTION_CREATED: EventType +PRESCRIPTION_UPDATED: EventType +REFERRAL_REPORT_CREATED: EventType +REFERRAL_REPORT_UPDATED: EventType +TASK_ASSIGNED: EventType +TASK_CLOSED: EventType +TASK_COMMENT_CREATED: EventType +TASK_COMMENT_UPDATED: EventType +TASK_COMPLETED: EventType +TASK_CREATED: EventType +TASK_LABELS_ADJUSTED: EventType +TASK_UNASSIGNED: EventType +TASK_UPDATED: EventType +VITAL_SIGN_CREATED: EventType +VITAL_SIGN_UPDATED: EventType +CHART_OPENED: EventType +COMMAND_ORIGINATED: EventType + +class Event(_message.Message): + __slots__ = ("type", "target") + TYPE_FIELD_NUMBER: _ClassVar[int] + TARGET_FIELD_NUMBER: _ClassVar[int] + type: EventType + target: str + def __init__(self, type: _Optional[_Union[EventType, str]] = ..., target: _Optional[str] = ...) -> None: ... + +class EventResponse(_message.Message): + __slots__ = ("success", "effects") + SUCCESS_FIELD_NUMBER: _ClassVar[int] + EFFECTS_FIELD_NUMBER: _ClassVar[int] + success: bool + effects: _containers.RepeatedCompositeFieldContainer[_effects_pb2.Effect] + def __init__(self, success: bool = ..., effects: _Optional[_Iterable[_Union[_effects_pb2.Effect, _Mapping]]] = ...) -> None: ... diff --git a/plugin_runner/messages/events_pb2_grpc.py b/plugin_runner/messages/events_pb2_grpc.py new file mode 100644 index 00000000..2daafffe --- /dev/null +++ b/plugin_runner/messages/events_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/plugin_runner/plugin_runner.py b/plugin_runner/plugin_runner.py new file mode 100644 index 00000000..b59d1917 --- /dev/null +++ b/plugin_runner/plugin_runner.py @@ -0,0 +1,31 @@ +import asyncio + +from concurrent import futures +import logging + +import grpc + +from messages.effects_pb2 import Effect +from messages.events_pb2 import EventResponse, EventType +from services.plugin_runner_pb2_grpc import PluginRunnerServicer, add_PluginRunnerServicer_to_server + + +class PluginRunner(PluginRunnerServicer): + async def HandleEvent(self, request, context): + event_name = EventType.Name(request.type) + logging.info(f'Handling event: {event_name}') + yield EventResponse(success=True, effects=[Effect(type='Log', payload=f'Handled Event: "{event_name}"')]) + +async def serve(): + port = "50051" + server = grpc.aio.server() + add_PluginRunnerServicer_to_server(PluginRunner(), server) + server.add_insecure_port("[::]:" + port) + logging.info("Starting server, listening on " + port) + await server.start() + await server.wait_for_termination() + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + asyncio.run(serve()) diff --git a/plugin_runner/services/plugin_runner_pb2.py b/plugin_runner/services/plugin_runner_pb2.py new file mode 100644 index 00000000..43dae21b --- /dev/null +++ b/plugin_runner/services/plugin_runner_pb2.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: services/plugin_runner.proto +# Protobuf Python Version: 4.25.0 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from messages import events_pb2 as messages_dot_events__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/plugin_runner.proto\x12\x06\x63\x61nvas\x1a\x15messages/events.proto2E\n\x0cPluginRunner\x12\x35\n\x0bHandleEvent\x12\r.canvas.Event\x1a\x15.canvas.EventResponse0\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.plugin_runner_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_PLUGINRUNNER']._serialized_start=63 + _globals['_PLUGINRUNNER']._serialized_end=132 +# @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/services/plugin_runner_pb2.pyi b/plugin_runner/services/plugin_runner_pb2.pyi new file mode 100644 index 00000000..8398fed2 --- /dev/null +++ b/plugin_runner/services/plugin_runner_pb2.pyi @@ -0,0 +1,5 @@ +from messages import events_pb2 as _events_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/plugin_runner/services/plugin_runner_pb2_grpc.py b/plugin_runner/services/plugin_runner_pb2_grpc.py new file mode 100644 index 00000000..38264083 --- /dev/null +++ b/plugin_runner/services/plugin_runner_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from messages import events_pb2 as messages_dot_events__pb2 + + +class PluginRunnerStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.HandleEvent = channel.unary_stream( + '/canvas.PluginRunner/HandleEvent', + request_serializer=messages_dot_events__pb2.Event.SerializeToString, + response_deserializer=messages_dot_events__pb2.EventResponse.FromString, + ) + + +class PluginRunnerServicer(object): + """Missing associated documentation comment in .proto file.""" + + def HandleEvent(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_PluginRunnerServicer_to_server(servicer, server): + rpc_method_handlers = { + 'HandleEvent': grpc.unary_stream_rpc_method_handler( + servicer.HandleEvent, + request_deserializer=messages_dot_events__pb2.Event.FromString, + response_serializer=messages_dot_events__pb2.EventResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'canvas.PluginRunner', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class PluginRunner(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def HandleEvent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/canvas.PluginRunner/HandleEvent', + messages_dot_events__pb2.Event.SerializeToString, + messages_dot_events__pb2.EventResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/poetry.lock b/poetry.lock index 944beb41..a32c3b81 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -285,13 +285,13 @@ files = [ [[package]] name = "cookiecutter" -version = "2.5.0" +version = "2.6.0" description = "A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template." optional = false python-versions = ">=3.7" files = [ - {file = "cookiecutter-2.5.0-py3-none-any.whl", hash = "sha256:8aa2f12ed11bc05628651e9dc4353a10571dd9908aaaaeec959a2b9ea465a5d2"}, - {file = "cookiecutter-2.5.0.tar.gz", hash = "sha256:e61e9034748e3f41b8bd2c11f00d030784b48711c4d5c42363c50989a65331ec"}, + {file = "cookiecutter-2.6.0-py3-none-any.whl", hash = "sha256:a54a8e37995e4ed963b3e82831072d1ad4b005af736bb17b99c2cbd9d41b6e2d"}, + {file = "cookiecutter-2.6.0.tar.gz", hash = "sha256:db21f8169ea4f4fdc2408d48ca44859349de2647fbe494a9d6c3edfc0542c21c"}, ] [package.dependencies] @@ -306,43 +306,43 @@ rich = "*" [[package]] name = "cryptography" -version = "42.0.2" +version = "42.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.2-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:701171f825dcab90969596ce2af253143b93b08f1a716d4b2a9d2db5084ef7be"}, - {file = "cryptography-42.0.2-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:61321672b3ac7aade25c40449ccedbc6db72c7f5f0fdf34def5e2f8b51ca530d"}, - {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea2c3ffb662fec8bbbfce5602e2c159ff097a4631d96235fcf0fb00e59e3ece4"}, - {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b15c678f27d66d247132cbf13df2f75255627bcc9b6a570f7d2fd08e8c081d2"}, - {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:8e88bb9eafbf6a4014d55fb222e7360eef53e613215085e65a13290577394529"}, - {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a047682d324ba56e61b7ea7c7299d51e61fd3bca7dad2ccc39b72bd0118d60a1"}, - {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:36d4b7c4be6411f58f60d9ce555a73df8406d484ba12a63549c88bd64f7967f1"}, - {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:a00aee5d1b6c20620161984f8ab2ab69134466c51f58c052c11b076715e72929"}, - {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b97fe7d7991c25e6a31e5d5e795986b18fbbb3107b873d5f3ae6dc9a103278e9"}, - {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:5fa82a26f92871eca593b53359c12ad7949772462f887c35edaf36f87953c0e2"}, - {file = "cryptography-42.0.2-cp37-abi3-win32.whl", hash = "sha256:4b063d3413f853e056161eb0c7724822a9740ad3caa24b8424d776cebf98e7ee"}, - {file = "cryptography-42.0.2-cp37-abi3-win_amd64.whl", hash = "sha256:841ec8af7a8491ac76ec5a9522226e287187a3107e12b7d686ad354bb78facee"}, - {file = "cryptography-42.0.2-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:55d1580e2d7e17f45d19d3b12098e352f3a37fe86d380bf45846ef257054b242"}, - {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28cb2c41f131a5758d6ba6a0504150d644054fd9f3203a1e8e8d7ac3aea7f73a"}, - {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9097a208875fc7bbeb1286d0125d90bdfed961f61f214d3f5be62cd4ed8a446"}, - {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:44c95c0e96b3cb628e8452ec060413a49002a247b2b9938989e23a2c8291fc90"}, - {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2f9f14185962e6a04ab32d1abe34eae8a9001569ee4edb64d2304bf0d65c53f3"}, - {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:09a77e5b2e8ca732a19a90c5bca2d124621a1edb5438c5daa2d2738bfeb02589"}, - {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad28cff53f60d99a928dfcf1e861e0b2ceb2bc1f08a074fdd601b314e1cc9e0a"}, - {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:130c0f77022b2b9c99d8cebcdd834d81705f61c68e91ddd614ce74c657f8b3ea"}, - {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:fa3dec4ba8fb6e662770b74f62f1a0c7d4e37e25b58b2bf2c1be4c95372b4a33"}, - {file = "cryptography-42.0.2-cp39-abi3-win32.whl", hash = "sha256:3dbd37e14ce795b4af61b89b037d4bc157f2cb23e676fa16932185a04dfbf635"}, - {file = "cryptography-42.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:8a06641fb07d4e8f6c7dda4fc3f8871d327803ab6542e33831c7ccfdcb4d0ad6"}, - {file = "cryptography-42.0.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:087887e55e0b9c8724cf05361357875adb5c20dec27e5816b653492980d20380"}, - {file = "cryptography-42.0.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a7ef8dd0bf2e1d0a27042b231a3baac6883cdd5557036f5e8df7139255feaac6"}, - {file = "cryptography-42.0.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4383b47f45b14459cab66048d384614019965ba6c1a1a141f11b5a551cace1b2"}, - {file = "cryptography-42.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:fbeb725c9dc799a574518109336acccaf1303c30d45c075c665c0793c2f79a7f"}, - {file = "cryptography-42.0.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:320948ab49883557a256eab46149df79435a22d2fefd6a66fe6946f1b9d9d008"}, - {file = "cryptography-42.0.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5ef9bc3d046ce83c4bbf4c25e1e0547b9c441c01d30922d812e887dc5f125c12"}, - {file = "cryptography-42.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:52ed9ebf8ac602385126c9a2fe951db36f2cb0c2538d22971487f89d0de4065a"}, - {file = "cryptography-42.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:141e2aa5ba100d3788c0ad7919b288f89d1fe015878b9659b307c9ef867d3a65"}, - {file = "cryptography-42.0.2.tar.gz", hash = "sha256:e0ec52ba3c7f1b7d813cd52649a5b3ef1fc0d433219dc8c93827c57eab6cf888"}, + {file = "cryptography-42.0.4-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449"}, + {file = "cryptography-42.0.4-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:db4b65b02f59035037fde0998974d84244a64c3265bdef32a827ab9b63d61b18"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad9c385ba8ee025bb0d856714f71d7840020fe176ae0229de618f14dae7a6e2"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69b22ab6506a3fe483d67d1ed878e1602bdd5912a134e6202c1ec672233241c1"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e09469a2cec88fb7b078e16d4adec594414397e8879a4341c6ace96013463d5b"}, + {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3e970a2119507d0b104f0a8e281521ad28fc26f2820687b3436b8c9a5fcf20d1"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:e53dc41cda40b248ebc40b83b31516487f7db95ab8ceac1f042626bc43a2f992"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:c3a5cbc620e1e17009f30dd34cb0d85c987afd21c41a74352d1719be33380885"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6bfadd884e7280df24d26f2186e4e07556a05d37393b0f220a840b083dc6a824"}, + {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:01911714117642a3f1792c7f376db572aadadbafcd8d75bb527166009c9f1d1b"}, + {file = "cryptography-42.0.4-cp37-abi3-win32.whl", hash = "sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925"}, + {file = "cryptography-42.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:c1f25b252d2c87088abc8bbc4f1ecbf7c919e05508a7e8628e6875c40bc70923"}, + {file = "cryptography-42.0.4-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:15a1fb843c48b4a604663fa30af60818cd28f895572386e5f9b8a665874c26e7"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1327f280c824ff7885bdeef8578f74690e9079267c1c8bd7dc5cc5aa065ae52"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ffb03d419edcab93b4b19c22ee80c007fb2d708429cecebf1dd3258956a563a"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:1df6fcbf60560d2113b5ed90f072dc0b108d64750d4cbd46a21ec882c7aefce9"}, + {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:44a64043f743485925d3bcac548d05df0f9bb445c5fcca6681889c7c3ab12764"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:3c6048f217533d89f2f8f4f0fe3044bf0b2090453b7b73d0b77db47b80af8dff"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:6d0fbe73728c44ca3a241eff9aefe6496ab2656d6e7a4ea2459865f2e8613257"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:887623fe0d70f48ab3f5e4dbf234986b1329a64c066d719432d0698522749929"}, + {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce8613beaffc7c14f091497346ef117c1798c202b01153a8cc7b8e2ebaaf41c0"}, + {file = "cryptography-42.0.4-cp39-abi3-win32.whl", hash = "sha256:810bcf151caefc03e51a3d61e53335cd5c7316c0a105cc695f0959f2c638b129"}, + {file = "cryptography-42.0.4-cp39-abi3-win_amd64.whl", hash = "sha256:a0298bdc6e98ca21382afe914c642620370ce0470a01e1bef6dd9b5354c36854"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f8907fcf57392cd917892ae83708761c6ff3c37a8e835d7246ff0ad251d9298"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:12d341bd42cdb7d4937b0cabbdf2a94f949413ac4504904d0cdbdce4a22cbf88"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1cdcdbd117681c88d717437ada72bdd5be9de117f96e3f4d50dab3f59fd9ab20"}, + {file = "cryptography-42.0.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0e89f7b84f421c56e7ff69f11c441ebda73b8a8e6488d322ef71746224c20fce"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f1e85a178384bf19e36779d91ff35c7617c885da487d689b05c1366f9933ad74"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d2a27aca5597c8a71abbe10209184e1a8e91c1fd470b5070a2ea60cafec35bcd"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4e36685cb634af55e0677d435d425043967ac2f3790ec652b2b88ad03b85c27b"}, + {file = "cryptography-42.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f47be41843200f7faec0683ad751e5ef11b9a56a220d57f300376cd8aba81660"}, + {file = "cryptography-42.0.4.tar.gz", hash = "sha256:831a4b37accef30cccd34fcb916a5d7b5be3cbbe27268a02832c3e450aea39cb"}, ] [package.dependencies] @@ -439,30 +439,163 @@ smmap = ">=3.0.1,<6" [[package]] name = "gitpython" -version = "3.1.41" +version = "3.1.42" description = "GitPython is a Python library used to interact with Git repositories" optional = false python-versions = ">=3.7" files = [ - {file = "GitPython-3.1.41-py3-none-any.whl", hash = "sha256:c36b6634d069b3f719610175020a9aed919421c87552185b085e04fbbdb10b7c"}, - {file = "GitPython-3.1.41.tar.gz", hash = "sha256:ed66e624884f76df22c8e16066d567aaa5a37d5b5fa19db2c6df6f7156db9048"}, + {file = "GitPython-3.1.42-py3-none-any.whl", hash = "sha256:1bf9cd7c9e7255f77778ea54359e54ac22a72a5b51288c457c881057b7bb9ecd"}, + {file = "GitPython-3.1.42.tar.gz", hash = "sha256:2d99869e0fef71a73cbd242528105af1d6c1b108c60dfabd994bf292f76c3ceb"}, ] [package.dependencies] gitdb = ">=4.0.1,<5" [package.extras] -test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "sumtypes"] +test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar"] + +[[package]] +name = "grpcio" +version = "1.62.0" +description = "HTTP/2-based RPC framework" +optional = false +python-versions = ">=3.7" +files = [ + {file = "grpcio-1.62.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:136ffd79791b1eddda8d827b607a6285474ff8a1a5735c4947b58c481e5e4271"}, + {file = "grpcio-1.62.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:d6a56ba703be6b6267bf19423d888600c3f574ac7c2cc5e6220af90662a4d6b0"}, + {file = "grpcio-1.62.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:4cd356211579043fce9f52acc861e519316fff93980a212c8109cca8f47366b6"}, + {file = "grpcio-1.62.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e803e9b58d8f9b4ff0ea991611a8d51b31c68d2e24572cd1fe85e99e8cc1b4f8"}, + {file = "grpcio-1.62.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4c04fe33039b35b97c02d2901a164bbbb2f21fb9c4e2a45a959f0b044c3512c"}, + {file = "grpcio-1.62.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:95370c71b8c9062f9ea033a0867c4c73d6f0ff35113ebd2618171ec1f1e903e0"}, + {file = "grpcio-1.62.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c912688acc05e4ff012c8891803659d6a8a8b5106f0f66e0aed3fb7e77898fa6"}, + {file = "grpcio-1.62.0-cp310-cp310-win32.whl", hash = "sha256:821a44bd63d0f04e33cf4ddf33c14cae176346486b0df08b41a6132b976de5fc"}, + {file = "grpcio-1.62.0-cp310-cp310-win_amd64.whl", hash = "sha256:81531632f93fece32b2762247c4c169021177e58e725494f9a746ca62c83acaa"}, + {file = "grpcio-1.62.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:3fa15850a6aba230eed06b236287c50d65a98f05054a0f01ccedf8e1cc89d57f"}, + {file = "grpcio-1.62.0-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:36df33080cd7897623feff57831eb83c98b84640b016ce443305977fac7566fb"}, + {file = "grpcio-1.62.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:7a195531828b46ea9c4623c47e1dc45650fc7206f8a71825898dd4c9004b0928"}, + {file = "grpcio-1.62.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab140a3542bbcea37162bdfc12ce0d47a3cda3f2d91b752a124cc9fe6776a9e2"}, + {file = "grpcio-1.62.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f9d6c3223914abb51ac564dc9c3782d23ca445d2864321b9059d62d47144021"}, + {file = "grpcio-1.62.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:fbe0c20ce9a1cff75cfb828b21f08d0a1ca527b67f2443174af6626798a754a4"}, + {file = "grpcio-1.62.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38f69de9c28c1e7a8fd24e4af4264726637b72f27c2099eaea6e513e7142b47e"}, + {file = "grpcio-1.62.0-cp311-cp311-win32.whl", hash = "sha256:ce1aafdf8d3f58cb67664f42a617af0e34555fe955450d42c19e4a6ad41c84bd"}, + {file = "grpcio-1.62.0-cp311-cp311-win_amd64.whl", hash = "sha256:eef1d16ac26c5325e7d39f5452ea98d6988c700c427c52cbc7ce3201e6d93334"}, + {file = "grpcio-1.62.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:8aab8f90b2a41208c0a071ec39a6e5dbba16fd827455aaa070fec241624ccef8"}, + {file = "grpcio-1.62.0-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:62aa1659d8b6aad7329ede5d5b077e3d71bf488d85795db517118c390358d5f6"}, + {file = "grpcio-1.62.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:0d7ae7fc7dbbf2d78d6323641ded767d9ec6d121aaf931ec4a5c50797b886532"}, + {file = "grpcio-1.62.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f359d635ee9428f0294bea062bb60c478a8ddc44b0b6f8e1f42997e5dc12e2ee"}, + {file = "grpcio-1.62.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d48e5b1f8f4204889f1acf30bb57c30378e17c8d20df5acbe8029e985f735c"}, + {file = "grpcio-1.62.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:662d3df5314ecde3184cf87ddd2c3a66095b3acbb2d57a8cada571747af03873"}, + {file = "grpcio-1.62.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:92cdb616be44c8ac23a57cce0243af0137a10aa82234f23cd46e69e115071388"}, + {file = "grpcio-1.62.0-cp312-cp312-win32.whl", hash = "sha256:0b9179478b09ee22f4a36b40ca87ad43376acdccc816ce7c2193a9061bf35701"}, + {file = "grpcio-1.62.0-cp312-cp312-win_amd64.whl", hash = "sha256:614c3ed234208e76991992342bab725f379cc81c7dd5035ee1de2f7e3f7a9842"}, + {file = "grpcio-1.62.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:7e1f51e2a460b7394670fdb615e26d31d3260015154ea4f1501a45047abe06c9"}, + {file = "grpcio-1.62.0-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:bcff647e7fe25495e7719f779cc219bbb90b9e79fbd1ce5bda6aae2567f469f2"}, + {file = "grpcio-1.62.0-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:56ca7ba0b51ed0de1646f1735154143dcbdf9ec2dbe8cc6645def299bb527ca1"}, + {file = "grpcio-1.62.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e84bfb2a734e4a234b116be208d6f0214e68dcf7804306f97962f93c22a1839"}, + {file = "grpcio-1.62.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c1488b31a521fbba50ae86423f5306668d6f3a46d124f7819c603979fc538c4"}, + {file = "grpcio-1.62.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:98d8f4eb91f1ce0735bf0b67c3b2a4fea68b52b2fd13dc4318583181f9219b4b"}, + {file = "grpcio-1.62.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b3d3d755cfa331d6090e13aac276d4a3fb828bf935449dc16c3d554bf366136b"}, + {file = "grpcio-1.62.0-cp37-cp37m-win_amd64.whl", hash = "sha256:a33f2bfd8a58a02aab93f94f6c61279be0f48f99fcca20ebaee67576cd57307b"}, + {file = "grpcio-1.62.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:5e709f7c8028ce0443bddc290fb9c967c1e0e9159ef7a030e8c21cac1feabd35"}, + {file = "grpcio-1.62.0-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:2f3d9a4d0abb57e5f49ed5039d3ed375826c2635751ab89dcc25932ff683bbb6"}, + {file = "grpcio-1.62.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:62ccb92f594d3d9fcd00064b149a0187c246b11e46ff1b7935191f169227f04c"}, + {file = "grpcio-1.62.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:921148f57c2e4b076af59a815467d399b7447f6e0ee10ef6d2601eb1e9c7f402"}, + {file = "grpcio-1.62.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f897b16190b46bc4d4aaf0a32a4b819d559a37a756d7c6b571e9562c360eed72"}, + {file = "grpcio-1.62.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1bc8449084fe395575ed24809752e1dc4592bb70900a03ca42bf236ed5bf008f"}, + {file = "grpcio-1.62.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:81d444e5e182be4c7856cd33a610154fe9ea1726bd071d07e7ba13fafd202e38"}, + {file = "grpcio-1.62.0-cp38-cp38-win32.whl", hash = "sha256:88f41f33da3840b4a9bbec68079096d4caf629e2c6ed3a72112159d570d98ebe"}, + {file = "grpcio-1.62.0-cp38-cp38-win_amd64.whl", hash = "sha256:fc2836cb829895ee190813446dce63df67e6ed7b9bf76060262c55fcd097d270"}, + {file = "grpcio-1.62.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:fcc98cff4084467839d0a20d16abc2a76005f3d1b38062464d088c07f500d170"}, + {file = "grpcio-1.62.0-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:0d3dee701e48ee76b7d6fbbba18ba8bc142e5b231ef7d3d97065204702224e0e"}, + {file = "grpcio-1.62.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:b7a6be562dd18e5d5bec146ae9537f20ae1253beb971c0164f1e8a2f5a27e829"}, + {file = "grpcio-1.62.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29cb592c4ce64a023712875368bcae13938c7f03e99f080407e20ffe0a9aa33b"}, + {file = "grpcio-1.62.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1eda79574aec8ec4d00768dcb07daba60ed08ef32583b62b90bbf274b3c279f7"}, + {file = "grpcio-1.62.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7eea57444a354ee217fda23f4b479a4cdfea35fb918ca0d8a0e73c271e52c09c"}, + {file = "grpcio-1.62.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0e97f37a3b7c89f9125b92d22e9c8323f4e76e7993ba7049b9f4ccbe8bae958a"}, + {file = "grpcio-1.62.0-cp39-cp39-win32.whl", hash = "sha256:39cd45bd82a2e510e591ca2ddbe22352e8413378852ae814549c162cf3992a93"}, + {file = "grpcio-1.62.0-cp39-cp39-win_amd64.whl", hash = "sha256:b71c65427bf0ec6a8b48c68c17356cb9fbfc96b1130d20a07cb462f4e4dcdcd5"}, +] + +[package.extras] +protobuf = ["grpcio-tools (>=1.62.0)"] + +[[package]] +name = "grpcio-tools" +version = "1.60.1" +description = "Protobuf code generator for gRPC" +optional = false +python-versions = ">=3.7" +files = [ + {file = "grpcio-tools-1.60.1.tar.gz", hash = "sha256:da08224ab8675c6d464b988bd8ca02cccd2bf0275bceefe8f6219bfd4a4f5e85"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:184b27333b627a7cc0972fb70d21a8bb7c02ac4a6febc16768d78ea8ff883ddd"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:18d7737f29ef5bbe3352547d0eccd080807834f00df223867dfc860bf81e9180"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:cc8ba358d2c658c6ecbc58e779bf0fc5a673fecac015a70db27fc5b4d37b76b6"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2973f75e8ba5c551033a1d59cc97654f6f386deaf2559082011d245d7ed87bba"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28ae665113affebdd109247386786e5ab4dccfcfad1b5f68e9cce2e326b57ee6"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5c7ed086fef5ff59f46d53a052b1934b73e0f7d12365d656d6af3a88057d5a3e"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8540f6480428a52614db71dd6394f52cbc0d2565b5ea1136a982f26390a42c7a"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-win32.whl", hash = "sha256:5b4a939097005531edec331f22d0b82bff26e71ede009354d2f375b5d41e74f0"}, + {file = "grpcio_tools-1.60.1-cp310-cp310-win_amd64.whl", hash = "sha256:075bb67895970f96aabc1761ca674bf4db193f8fcad387f08e50402023b5f953"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:284749d20fb22418f17d3d351b9eb838caf4a0393a9cb02c36e5c32fa4bbe9db"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:b1041377cf32ee2338284ee26e6b9c10f9ea7728092376b19803dcb9b91d510d"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:e529cd3d4109a6f4a3f7bdaca68946eb33734e2d7ffe861785a0586abe99ee67"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:31294b534f25f02ead204e58dcbe0e5437a95a1a6f276bb9378905595b02ff6d"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fb6f4d2df0388c35c2804ba170f511238a681b679ead013bfe5e39d0ea9cf48"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:40cd8268a675269ce59c4fa50877597ec638bb1099c52237bb726c8ac9791868"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:985ac476da365267a2367ab20060f9096fbfc2e190fb02dd394f9ec05edf03ca"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-win32.whl", hash = "sha256:bd85f6c368b93ae45edf8568473053cb1cc075ef3489efb18f9832d4ecce062f"}, + {file = "grpcio_tools-1.60.1-cp311-cp311-win_amd64.whl", hash = "sha256:c20e752ff5057758845f4e5c7a298739bfba291f373ed18ea9c7c7acbe69e8ab"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:aafc94616c5f89c891d859057b194a153c451f9921053454e9d7d4cbf79047eb"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:9bba347000f57dae8aea79c0d76ef7d72895597524d30d0170c7d1974a3a03f3"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:1e96a532d38411f0543fe1903ff522f7142a9901afb0ed94de58d79caf1905be"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ea6e397d87f458bb2c387a4a6e1b65df74ce5b5194a1f16850c38309012e981"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aeecd5b8faa2aab67e6c8b8a57e888c00ce70d39f331ede0a21312e92def1a6"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:d2c26ce5f774c98bd2d3d8d1703048394018b55d297ebdb41ed2ba35b9a34f68"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:214281cdafb7acfdcde848eca2de7c888a6e2b5cd25ab579712b965ea09a9cd4"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-win32.whl", hash = "sha256:8c4b917aa4fcdc77990773063f0f14540aab8d4a8bf6c862b964a45d891a31d2"}, + {file = "grpcio_tools-1.60.1-cp312-cp312-win_amd64.whl", hash = "sha256:0aa34c7c21cff2177a4096b2b0d51dfbc9f8a41f929847a434e89b352c5a215d"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:acdba77584981fe799104aa545d9d97910bcf88c69b668b768c1f3e7d7e5afac"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:2a7fa55bc62d4b8ebe6fb26f8cf89df3cf3b504eb6c5f3a2f0174689d35fddb0"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:dffa326cf901fe08a0e218d9fdf593f12276088a8caa07fcbec7d051149cf9ef"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf945bd22f396c0d0c691e0990db2bfc4e77816b1edc2aea8a69c35ae721aac9"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6801cfc5a85f0fb6fd12cade45942aaa1c814422328d594d12d364815fe34123"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f95bdc6c7c50b7fc442e53537bc5b4eb8cab2a671c1da80d40b5a4ab1fd5d416"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:402efeec36d8b12b792bae8a900085416fc2f57a34b599445ace2e847b6b0d75"}, + {file = "grpcio_tools-1.60.1-cp37-cp37m-win_amd64.whl", hash = "sha256:af88a2062b9c35034a80b25f289034b9c3c00c42bb88efaa465503a06fbd6a87"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:46b495bae31c5d3f6ac0240eb848f0642b5410f80dff2aacdea20cdea3938c1d"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:b5ae375207af9aa82f516dcd513d2e0c83690b7788d45844daad846ed87550f8"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:15f13e8f3d77b96adcb1e3615acec5b100bd836c6010c58a51465bcb9c06d128"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c354505e6a3d170da374f20404ea6a78135502df4f5534e5c532bdf24c4cc2a5"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8cfab27ba2bd36a3e3b522aed686133531e8b919703d0247a0885dae8815317"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b6ef213cb0aecb2832ee82a2eac32f29f31f50b17ce020604d82205096a6bd0c"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0b62cb2d43a7f0eacc6a6962dfff7c2564874012e1a72ae4167e762f449e2912"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-win32.whl", hash = "sha256:3fcabf484720a9fa1690e2825fc940027a05a0c79a1075a730008ef634bd8ad2"}, + {file = "grpcio_tools-1.60.1-cp38-cp38-win_amd64.whl", hash = "sha256:22ce3e3d861321d208d8bfd6161ab976623520b179712c90b2c175151463a6b1"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:4e66fe204da15e08e599adb3060109a42927c0868fe8933e2d341ea649eceb03"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:c1047bd831de5d9da761e9dc246988d5f07d722186938dfd5f34807398101010"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:eba5fafd70585fbd4cb6ae45e3c5e11d8598e2426c9f289b78f682c0606e81cb"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bba7230c60238c7a4ffa29f1aff6d78edb41f2c79cbe4443406472b1c80ccb5d"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a2bb8efc2cd64bd8f2779b426dd7e94e60924078ba5150cbbb60a846e62d1ed2"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:26f91161a91f1601777751230eaaafdf416fed08a15c3ba2ae391088e4a906c6"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2c19be2bba5583e30f88bb5d71b430176c396f0d6d0db3785e5845bfa3d28cd2"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-win32.whl", hash = "sha256:9aadc9c00baa2064baa4414cff7c269455449f14805a355226674d89c507342c"}, + {file = "grpcio_tools-1.60.1-cp39-cp39-win_amd64.whl", hash = "sha256:652b08c9fef39186ce4f97f05f5440c0ed41f117db0f7d6cb0e0d75dbc6afd3f"}, +] + +[package.dependencies] +grpcio = ">=1.60.1" +protobuf = ">=4.21.6,<5.0dev" +setuptools = "*" [[package]] name = "identify" -version = "2.5.34" +version = "2.5.35" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.34-py2.py3-none-any.whl", hash = "sha256:a4316013779e433d08b96e5eabb7f641e6c7942e4ab5d4c509ebd2e7a8994aed"}, - {file = "identify-2.5.34.tar.gz", hash = "sha256:ee17bc9d499899bc9eaec1ac7bf2dc9eedd480db9d88b96d123d3b64a9d34f5d"}, + {file = "identify-2.5.35-py2.py3-none-any.whl", hash = "sha256:c4de0081837b211594f8e877a6b4fad7ca32bbfc1a9307fdd61c28bfe923f13e"}, + {file = "identify-2.5.35.tar.gz", hash = "sha256:10a7ca245cfcd756a554a7288159f72ff105ad233c7c4b9c6f0f4d108f5f6791"}, ] [package.extras] @@ -866,13 +999,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.6.1" +version = "3.6.2" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-3.6.1-py2.py3-none-any.whl", hash = "sha256:9fe989afcf095d2c4796ce7c553cf28d4d4a9b9346de3cda079bcf40748454a4"}, - {file = "pre_commit-3.6.1.tar.gz", hash = "sha256:c90961d8aa706f75d60935aba09469a6b0bcb8345f127c3fbee4bdc5f114cf4b"}, + {file = "pre_commit-3.6.2-py2.py3-none-any.whl", hash = "sha256:ba637c2d7a670c10daedc059f5c49b5bd0aadbccfcd7ec15592cf9665117532c"}, + {file = "pre_commit-3.6.2.tar.gz", hash = "sha256:c3ef34f463045c88658c5b99f38c1e297abdcc0ff13f98d3370055fbbfabc67e"}, ] [package.dependencies] @@ -896,6 +1029,26 @@ files = [ [package.dependencies] wcwidth = "*" +[[package]] +name = "protobuf" +version = "4.25.3" +description = "" +optional = false +python-versions = ">=3.8" +files = [ + {file = "protobuf-4.25.3-cp310-abi3-win32.whl", hash = "sha256:d4198877797a83cbfe9bffa3803602bbe1625dc30d8a097365dbc762e5790faa"}, + {file = "protobuf-4.25.3-cp310-abi3-win_amd64.whl", hash = "sha256:209ba4cc916bab46f64e56b85b090607a676f66b473e6b762e6f1d9d591eb2e8"}, + {file = "protobuf-4.25.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:f1279ab38ecbfae7e456a108c5c0681e4956d5b1090027c1de0f934dfdb4b35c"}, + {file = "protobuf-4.25.3-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:e7cb0ae90dd83727f0c0718634ed56837bfeeee29a5f82a7514c03ee1364c019"}, + {file = "protobuf-4.25.3-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:7c8daa26095f82482307bc717364e7c13f4f1c99659be82890dcfc215194554d"}, + {file = "protobuf-4.25.3-cp38-cp38-win32.whl", hash = "sha256:f4f118245c4a087776e0a8408be33cf09f6c547442c00395fbfb116fac2f8ac2"}, + {file = "protobuf-4.25.3-cp38-cp38-win_amd64.whl", hash = "sha256:c053062984e61144385022e53678fbded7aea14ebb3e0305ae3592fb219ccfa4"}, + {file = "protobuf-4.25.3-cp39-cp39-win32.whl", hash = "sha256:19b270aeaa0099f16d3ca02628546b8baefe2955bbe23224aaf856134eccf1e4"}, + {file = "protobuf-4.25.3-cp39-cp39-win_amd64.whl", hash = "sha256:e3c97a1555fd6388f857770ff8b9703083de6bf1f9274a002a332d65fbb56c8c"}, + {file = "protobuf-4.25.3-py3-none-any.whl", hash = "sha256:f0700d54bcf45424477e46a9f0944155b46fb0639d69728739c0e47bab83f2b9"}, + {file = "protobuf-4.25.3.tar.gz", hash = "sha256:25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c"}, +] + [[package]] name = "ptyprocess" version = "0.7.0" @@ -1059,13 +1212,13 @@ windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.0.0" +version = "8.0.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, - {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, + {file = "pytest-8.0.1-py3-none-any.whl", hash = "sha256:3e4f16fe1c0a9dc9d9389161c127c3edc5d810c38d6793042fb81d9f48a59fca"}, + {file = "pytest-8.0.1.tar.gz", hash = "sha256:267f6563751877d772019b13aacbe4e860d73fe8f651f28112e9ac37de7513ae"}, ] [package.dependencies] @@ -1129,13 +1282,13 @@ yaml = ["PyYaml (>=6.0.1)"] [[package]] name = "python-semantic-release" -version = "9.0.3" +version = "9.1.0" description = "Automatic Semantic Versioning for Python projects" optional = false python-versions = ">=3.8" files = [ - {file = "python-semantic-release-9.0.3.tar.gz", hash = "sha256:c11ce2d805347ba29175a2c35072afa013cd2bf502e57193ac1ed79e14c057cc"}, - {file = "python_semantic_release-9.0.3-py3-none-any.whl", hash = "sha256:13385d60546eaac80b3bfea18503d551936a3c5bd73f960d59d94d021a9e274c"}, + {file = "python-semantic-release-9.1.0.tar.gz", hash = "sha256:0317e72a940c5080c8aa6ff56cce6230f045b1a8f91f0a58fdc8f80745912369"}, + {file = "python_semantic_release-9.1.0-py3-none-any.whl", hash = "sha256:7ca5fb1ea4d5215182db477fbc53d9f4c907b7030520c4ac6640b9aaa71dbce7"}, ] [package.dependencies] @@ -1149,7 +1302,7 @@ python-gitlab = ">=2,<5" requests = ">=2.25,<3" rich = ">=12.5.1" shellingham = ">=1.5.0.post1" -tomlkit = ">=0.10,<1.0" +tomlkit = ">=0.11,<1.0" [package.extras] dev = ["pre-commit", "ruff (==0.1.11)", "tox"] @@ -1210,6 +1363,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1494,13 +1648,13 @@ files = [ [[package]] name = "types-requests" -version = "2.31.0.20240125" +version = "2.31.0.20240218" description = "Typing stubs for requests" optional = false python-versions = ">=3.8" files = [ - {file = "types-requests-2.31.0.20240125.tar.gz", hash = "sha256:03a28ce1d7cd54199148e043b2079cdded22d6795d19a2c2a6791a4b2b5e2eb5"}, - {file = "types_requests-2.31.0.20240125-py3-none-any.whl", hash = "sha256:9592a9a4cb92d6d75d9b491a41477272b710e021011a2a3061157e2fb1f1a5d1"}, + {file = "types-requests-2.31.0.20240218.tar.gz", hash = "sha256:f1721dba8385958f504a5386240b92de4734e047a08a40751c1654d1ac3349c5"}, + {file = "types_requests-2.31.0.20240218-py3-none-any.whl", hash = "sha256:a82807ec6ddce8f00fe0e949da6d6bc1fbf1715420218a9640d695f70a9e5a9b"}, ] [package.dependencies] @@ -1519,13 +1673,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.0" +version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, - {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, + {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, + {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, ] [package.extras] @@ -1599,4 +1753,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.11" -content-hash = "39d979a0220c2e185c60dcd3e2a4070bce108e7af923eefdef5a3a119232acfe" +content-hash = "721cf06d2170ccf9d290ecac7aa9c3fb30f746787c4e11381e77595baea6def4" diff --git a/protobufs/generate_protobufs.sh b/protobufs/generate_protobufs.sh new file mode 100755 index 00000000..a432383b --- /dev/null +++ b/protobufs/generate_protobufs.sh @@ -0,0 +1,4 @@ +#! /bin/sh + +# poetry run python -m grpc_tools.protoc -I=protobufs/ --python_out=plugin_runner/ --pyi_out=plugin_runner/ --grpc_python_out=plugin_runner/ protobufs/**/*.proto +python -m grpc_tools.protoc -I=protobufs/ --python_out=plugin_runner/ --pyi_out=plugin_runner/ --grpc_python_out=plugin_runner/ protobufs/**/*.proto diff --git a/protobufs/messages/effects.proto b/protobufs/messages/effects.proto new file mode 100644 index 00000000..aacba1e8 --- /dev/null +++ b/protobufs/messages/effects.proto @@ -0,0 +1,11 @@ +syntax = 'proto3'; + +package canvas; + +message Effect { + string type = 1; + string payload = 2; + //Oneof effect_payload { + // ... + //} +} diff --git a/protobufs/messages/events.proto b/protobufs/messages/events.proto new file mode 100644 index 00000000..03d163a3 --- /dev/null +++ b/protobufs/messages/events.proto @@ -0,0 +1,88 @@ +syntax = 'proto3'; + +import "messages/effects.proto"; + +package canvas; + +enum EventType { + UNKNOWN = 0; + + // Workflow kit-inspired events + + ALLERGY_INTOLERANCE_CREATED = 1; + ALLERGY_INTOLERANCE_UPDATED = 2; + APPOINTMENT_BOOKED = 3; + APPOINTMENT_CANCELED = 4; + APPOINTMENT_CHECKED_IN = 5; + APPOINTMENT_CREATED = 6; + APPOINTMENT_NO_SHOWED = 7; + APPOINTMENT_RESCHEDULED = 8; + APPOINTMENT_RESTORED = 9; + APPOINTMENT_UPDATED = 10; + BILLING_LINE_ITEM_CREATED = 11; + BILLING_LINE_ITEM_UPDATED = 12; + CONDITION_ASSESSED = 13; + CONDITION_CREATED = 14; + CONDITION_RESOLVED = 15; + CONDITION_UPDATED = 16; + CONSENT_CREATED = 17; + CONSENT_DELETED = 18; + CONSENT_UPDATED = 19; + COVERAGE_CREATED = 20; + COVERAGE_UPDATED = 21; + ENCOUNTER_CREATED = 22; + ENCOUNTER_UPDATED = 23; + EXTERNAL_EVENT_CREATED = 24; + EXTERNAL_EVENT_UPDATED = 25; + IMAGING_REPORT_CREATED = 26; + IMAGING_REPORT_UPDATED = 27; + IMMUNIZATION_CREATED = 28; + IMMUNIZATION_STATEMENT_CREATED = 29; + IMMUNIZATION_STATEMENT_UPDATED = 30; + IMMUNIZATION_UPDATED = 31; + INSTRUCTION_CREATED = 32; + INSTRUCTION_UPDATED = 33; + INTERVIEW_CREATED = 34; + INTERVIEW_UPDATED = 35; + LAB_ORDER_CREATED = 36; + LAB_ORDER_UPDATED = 37; + LAB_REPORT_CREATED = 38; + LAB_REPORT_UPDATED = 39; + MEDICATION_LIST_ITEM_CREATED = 40; + MEDICATION_LIST_ITEM_UPDATED = 41; + MESSAGE_CREATED = 42; + PATIENT_CREATED = 43; + PATIENT_UPDATED = 44; + PRESCRIPTION_CREATED = 45; + PRESCRIPTION_UPDATED = 46; + REFERRAL_REPORT_CREATED = 47; + REFERRAL_REPORT_UPDATED = 48; + TASK_ASSIGNED = 49; + TASK_CLOSED = 50; + TASK_COMMENT_CREATED = 51; + TASK_COMMENT_UPDATED = 52; + TASK_COMPLETED = 53; + TASK_CREATED = 54; + TASK_LABELS_ADJUSTED = 55; + TASK_UNASSIGNED = 56; + TASK_UPDATED = 57; + VITAL_SIGN_CREATED = 58; + VITAL_SIGN_UPDATED = 59; + + CHART_OPENED = 60; + + COMMAND_ORIGINATED = 61; +} + +message Event { + EventType type = 1; + // Oneof target = 2 { + // + // } + string target = 2; +} + +message EventResponse { + bool success = 1; + repeated Effect effects = 2; +} diff --git a/protobufs/services/plugin_runner.proto b/protobufs/services/plugin_runner.proto new file mode 100644 index 00000000..e1922d7e --- /dev/null +++ b/protobufs/services/plugin_runner.proto @@ -0,0 +1,9 @@ +syntax = 'proto3'; + +import "messages/events.proto"; + +package canvas; + +service PluginRunner { + rpc HandleEvent (Event) returns (stream EventResponse); +} diff --git a/pyproject.toml b/pyproject.toml index f0a7b404..8eb1390a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ python = ">=3.11" requests = "*" typer = {extras = ["all"], version = "*"} websocket-client = "^1.7.0" +grpcio = "^1.60.1" [tool.poetry.group.dev.dependencies] pre-commit = "*" @@ -56,6 +57,7 @@ pytest-mock = "*" python-semantic-release = "*" requests-mock = "*" types-requests = "*" +grpcio-tools = "^1.60.1" [tool.poetry.scripts] canvas = "canvas_cli.main:app" From c56f5fb0a547c4f8510f983afaf924e1ec4c4561 Mon Sep 17 00:00:00 2001 From: Andrew Duane Date: Tue, 20 Feb 2024 18:03:04 -0800 Subject: [PATCH 3/3] Ensure the generated classes are clearly marked as such via directory structure --- .../{ => generated}/messages/effects_pb2.py | 10 +++--- .../{ => generated}/messages/effects_pb2.pyi | 0 .../messages/effects_pb2_grpc.py | 0 .../generated/messages/events_pb2.py | 31 +++++++++++++++++++ .../{ => generated}/messages/events_pb2.pyi | 2 +- .../messages/events_pb2_grpc.py | 0 .../services/plugin_runner_pb2.py | 12 +++---- .../services/plugin_runner_pb2.pyi | 2 +- .../services/plugin_runner_pb2_grpc.py | 14 ++++----- plugin_runner/messages/events_pb2.py | 31 ------------------- plugin_runner/plugin_runner.py | 6 ++-- protobufs/generate_protobufs.sh | 4 +-- .../{ => generated}/messages/effects.proto | 0 .../{ => generated}/messages/events.proto | 2 +- .../services/plugin_runner.proto | 2 +- 15 files changed, 58 insertions(+), 58 deletions(-) rename plugin_runner/{ => generated}/messages/effects_pb2.py (59%) rename plugin_runner/{ => generated}/messages/effects_pb2.pyi (100%) rename plugin_runner/{ => generated}/messages/effects_pb2_grpc.py (100%) create mode 100644 plugin_runner/generated/messages/events_pb2.py rename plugin_runner/{ => generated}/messages/events_pb2.pyi (99%) rename plugin_runner/{ => generated}/messages/events_pb2_grpc.py (100%) rename plugin_runner/{ => generated}/services/plugin_runner_pb2.py (52%) rename plugin_runner/{ => generated}/services/plugin_runner_pb2.pyi (70%) rename plugin_runner/{ => generated}/services/plugin_runner_pb2_grpc.py (75%) delete mode 100644 plugin_runner/messages/events_pb2.py rename protobufs/{ => generated}/messages/effects.proto (100%) rename protobufs/{ => generated}/messages/events.proto (97%) rename protobufs/{ => generated}/services/plugin_runner.proto (74%) diff --git a/plugin_runner/messages/effects_pb2.py b/plugin_runner/generated/messages/effects_pb2.py similarity index 59% rename from plugin_runner/messages/effects_pb2.py rename to plugin_runner/generated/messages/effects_pb2.py index baf961f9..cfc041f8 100644 --- a/plugin_runner/messages/effects_pb2.py +++ b/plugin_runner/generated/messages/effects_pb2.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: messages/effects.proto +# source: generated/messages/effects.proto # Protobuf Python Version: 4.25.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor @@ -14,13 +14,13 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16messages/effects.proto\x12\x06\x63\x61nvas\"\'\n\x06\x45\x66\x66\x65\x63t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\tb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n generated/messages/effects.proto\x12\x06\x63\x61nvas\"\'\n\x06\x45\x66\x66\x65\x63t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\tb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.effects_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'generated.messages.effects_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _globals['_EFFECT']._serialized_start=34 - _globals['_EFFECT']._serialized_end=73 + _globals['_EFFECT']._serialized_start=44 + _globals['_EFFECT']._serialized_end=83 # @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/messages/effects_pb2.pyi b/plugin_runner/generated/messages/effects_pb2.pyi similarity index 100% rename from plugin_runner/messages/effects_pb2.pyi rename to plugin_runner/generated/messages/effects_pb2.pyi diff --git a/plugin_runner/messages/effects_pb2_grpc.py b/plugin_runner/generated/messages/effects_pb2_grpc.py similarity index 100% rename from plugin_runner/messages/effects_pb2_grpc.py rename to plugin_runner/generated/messages/effects_pb2_grpc.py diff --git a/plugin_runner/generated/messages/events_pb2.py b/plugin_runner/generated/messages/events_pb2.py new file mode 100644 index 00000000..5df69b41 --- /dev/null +++ b/plugin_runner/generated/messages/events_pb2.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: generated/messages/events.proto +# Protobuf Python Version: 4.25.0 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from generated.messages import effects_pb2 as generated_dot_messages_dot_effects__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fgenerated/messages/events.proto\x12\x06\x63\x61nvas\x1a generated/messages/effects.proto\"8\n\x05\x45vent\x12\x1f\n\x04type\x18\x01 \x01(\x0e\x32\x11.canvas.EventType\x12\x0e\n\x06target\x18\x02 \x01(\t\"A\n\rEventResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1f\n\x07\x65\x66\x66\x65\x63ts\x18\x02 \x03(\x0b\x32\x0e.canvas.Effect*\x95\x0c\n\tEventType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1f\n\x1b\x41LLERGY_INTOLERANCE_CREATED\x10\x01\x12\x1f\n\x1b\x41LLERGY_INTOLERANCE_UPDATED\x10\x02\x12\x16\n\x12\x41PPOINTMENT_BOOKED\x10\x03\x12\x18\n\x14\x41PPOINTMENT_CANCELED\x10\x04\x12\x1a\n\x16\x41PPOINTMENT_CHECKED_IN\x10\x05\x12\x17\n\x13\x41PPOINTMENT_CREATED\x10\x06\x12\x19\n\x15\x41PPOINTMENT_NO_SHOWED\x10\x07\x12\x1b\n\x17\x41PPOINTMENT_RESCHEDULED\x10\x08\x12\x18\n\x14\x41PPOINTMENT_RESTORED\x10\t\x12\x17\n\x13\x41PPOINTMENT_UPDATED\x10\n\x12\x1d\n\x19\x42ILLING_LINE_ITEM_CREATED\x10\x0b\x12\x1d\n\x19\x42ILLING_LINE_ITEM_UPDATED\x10\x0c\x12\x16\n\x12\x43ONDITION_ASSESSED\x10\r\x12\x15\n\x11\x43ONDITION_CREATED\x10\x0e\x12\x16\n\x12\x43ONDITION_RESOLVED\x10\x0f\x12\x15\n\x11\x43ONDITION_UPDATED\x10\x10\x12\x13\n\x0f\x43ONSENT_CREATED\x10\x11\x12\x13\n\x0f\x43ONSENT_DELETED\x10\x12\x12\x13\n\x0f\x43ONSENT_UPDATED\x10\x13\x12\x14\n\x10\x43OVERAGE_CREATED\x10\x14\x12\x14\n\x10\x43OVERAGE_UPDATED\x10\x15\x12\x15\n\x11\x45NCOUNTER_CREATED\x10\x16\x12\x15\n\x11\x45NCOUNTER_UPDATED\x10\x17\x12\x1a\n\x16\x45XTERNAL_EVENT_CREATED\x10\x18\x12\x1a\n\x16\x45XTERNAL_EVENT_UPDATED\x10\x19\x12\x1a\n\x16IMAGING_REPORT_CREATED\x10\x1a\x12\x1a\n\x16IMAGING_REPORT_UPDATED\x10\x1b\x12\x18\n\x14IMMUNIZATION_CREATED\x10\x1c\x12\"\n\x1eIMMUNIZATION_STATEMENT_CREATED\x10\x1d\x12\"\n\x1eIMMUNIZATION_STATEMENT_UPDATED\x10\x1e\x12\x18\n\x14IMMUNIZATION_UPDATED\x10\x1f\x12\x17\n\x13INSTRUCTION_CREATED\x10 \x12\x17\n\x13INSTRUCTION_UPDATED\x10!\x12\x15\n\x11INTERVIEW_CREATED\x10\"\x12\x15\n\x11INTERVIEW_UPDATED\x10#\x12\x15\n\x11LAB_ORDER_CREATED\x10$\x12\x15\n\x11LAB_ORDER_UPDATED\x10%\x12\x16\n\x12LAB_REPORT_CREATED\x10&\x12\x16\n\x12LAB_REPORT_UPDATED\x10\'\x12 \n\x1cMEDICATION_LIST_ITEM_CREATED\x10(\x12 \n\x1cMEDICATION_LIST_ITEM_UPDATED\x10)\x12\x13\n\x0fMESSAGE_CREATED\x10*\x12\x13\n\x0fPATIENT_CREATED\x10+\x12\x13\n\x0fPATIENT_UPDATED\x10,\x12\x18\n\x14PRESCRIPTION_CREATED\x10-\x12\x18\n\x14PRESCRIPTION_UPDATED\x10.\x12\x1b\n\x17REFERRAL_REPORT_CREATED\x10/\x12\x1b\n\x17REFERRAL_REPORT_UPDATED\x10\x30\x12\x11\n\rTASK_ASSIGNED\x10\x31\x12\x0f\n\x0bTASK_CLOSED\x10\x32\x12\x18\n\x14TASK_COMMENT_CREATED\x10\x33\x12\x18\n\x14TASK_COMMENT_UPDATED\x10\x34\x12\x12\n\x0eTASK_COMPLETED\x10\x35\x12\x10\n\x0cTASK_CREATED\x10\x36\x12\x18\n\x14TASK_LABELS_ADJUSTED\x10\x37\x12\x13\n\x0fTASK_UNASSIGNED\x10\x38\x12\x10\n\x0cTASK_UPDATED\x10\x39\x12\x16\n\x12VITAL_SIGN_CREATED\x10:\x12\x16\n\x12VITAL_SIGN_UPDATED\x10;\x12\x10\n\x0c\x43HART_OPENED\x10<\x12\x16\n\x12\x43OMMAND_ORIGINATED\x10=b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'generated.messages.events_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + _globals['_EVENTTYPE']._serialized_start=203 + _globals['_EVENTTYPE']._serialized_end=1760 + _globals['_EVENT']._serialized_start=77 + _globals['_EVENT']._serialized_end=133 + _globals['_EVENTRESPONSE']._serialized_start=135 + _globals['_EVENTRESPONSE']._serialized_end=200 +# @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/messages/events_pb2.pyi b/plugin_runner/generated/messages/events_pb2.pyi similarity index 99% rename from plugin_runner/messages/events_pb2.pyi rename to plugin_runner/generated/messages/events_pb2.pyi index 4bf17ee6..fe930373 100644 --- a/plugin_runner/messages/events_pb2.pyi +++ b/plugin_runner/generated/messages/events_pb2.pyi @@ -1,4 +1,4 @@ -from messages import effects_pb2 as _effects_pb2 +from generated.messages import effects_pb2 as _effects_pb2 from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor diff --git a/plugin_runner/messages/events_pb2_grpc.py b/plugin_runner/generated/messages/events_pb2_grpc.py similarity index 100% rename from plugin_runner/messages/events_pb2_grpc.py rename to plugin_runner/generated/messages/events_pb2_grpc.py diff --git a/plugin_runner/services/plugin_runner_pb2.py b/plugin_runner/generated/services/plugin_runner_pb2.py similarity index 52% rename from plugin_runner/services/plugin_runner_pb2.py rename to plugin_runner/generated/services/plugin_runner_pb2.py index 43dae21b..15e5acd6 100644 --- a/plugin_runner/services/plugin_runner_pb2.py +++ b/plugin_runner/generated/services/plugin_runner_pb2.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: services/plugin_runner.proto +# source: generated/services/plugin_runner.proto # Protobuf Python Version: 4.25.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor @@ -12,16 +12,16 @@ _sym_db = _symbol_database.Default() -from messages import events_pb2 as messages_dot_events__pb2 +from generated.messages import events_pb2 as generated_dot_messages_dot_events__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/plugin_runner.proto\x12\x06\x63\x61nvas\x1a\x15messages/events.proto2E\n\x0cPluginRunner\x12\x35\n\x0bHandleEvent\x12\r.canvas.Event\x1a\x15.canvas.EventResponse0\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&generated/services/plugin_runner.proto\x12\x06\x63\x61nvas\x1a\x1fgenerated/messages/events.proto2E\n\x0cPluginRunner\x12\x35\n\x0bHandleEvent\x12\r.canvas.Event\x1a\x15.canvas.EventResponse0\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.plugin_runner_pb2', _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'generated.services.plugin_runner_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _globals['_PLUGINRUNNER']._serialized_start=63 - _globals['_PLUGINRUNNER']._serialized_end=132 + _globals['_PLUGINRUNNER']._serialized_start=83 + _globals['_PLUGINRUNNER']._serialized_end=152 # @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/services/plugin_runner_pb2.pyi b/plugin_runner/generated/services/plugin_runner_pb2.pyi similarity index 70% rename from plugin_runner/services/plugin_runner_pb2.pyi rename to plugin_runner/generated/services/plugin_runner_pb2.pyi index 8398fed2..e4f93da2 100644 --- a/plugin_runner/services/plugin_runner_pb2.pyi +++ b/plugin_runner/generated/services/plugin_runner_pb2.pyi @@ -1,4 +1,4 @@ -from messages import events_pb2 as _events_pb2 +from generated.messages import events_pb2 as _events_pb2 from google.protobuf import descriptor as _descriptor from typing import ClassVar as _ClassVar diff --git a/plugin_runner/services/plugin_runner_pb2_grpc.py b/plugin_runner/generated/services/plugin_runner_pb2_grpc.py similarity index 75% rename from plugin_runner/services/plugin_runner_pb2_grpc.py rename to plugin_runner/generated/services/plugin_runner_pb2_grpc.py index 38264083..83f2b63e 100644 --- a/plugin_runner/services/plugin_runner_pb2_grpc.py +++ b/plugin_runner/generated/services/plugin_runner_pb2_grpc.py @@ -2,7 +2,7 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from messages import events_pb2 as messages_dot_events__pb2 +from generated.messages import events_pb2 as generated_dot_messages_dot_events__pb2 class PluginRunnerStub(object): @@ -16,8 +16,8 @@ def __init__(self, channel): """ self.HandleEvent = channel.unary_stream( '/canvas.PluginRunner/HandleEvent', - request_serializer=messages_dot_events__pb2.Event.SerializeToString, - response_deserializer=messages_dot_events__pb2.EventResponse.FromString, + request_serializer=generated_dot_messages_dot_events__pb2.Event.SerializeToString, + response_deserializer=generated_dot_messages_dot_events__pb2.EventResponse.FromString, ) @@ -35,8 +35,8 @@ def add_PluginRunnerServicer_to_server(servicer, server): rpc_method_handlers = { 'HandleEvent': grpc.unary_stream_rpc_method_handler( servicer.HandleEvent, - request_deserializer=messages_dot_events__pb2.Event.FromString, - response_serializer=messages_dot_events__pb2.EventResponse.SerializeToString, + request_deserializer=generated_dot_messages_dot_events__pb2.Event.FromString, + response_serializer=generated_dot_messages_dot_events__pb2.EventResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( @@ -60,7 +60,7 @@ def HandleEvent(request, timeout=None, metadata=None): return grpc.experimental.unary_stream(request, target, '/canvas.PluginRunner/HandleEvent', - messages_dot_events__pb2.Event.SerializeToString, - messages_dot_events__pb2.EventResponse.FromString, + generated_dot_messages_dot_events__pb2.Event.SerializeToString, + generated_dot_messages_dot_events__pb2.EventResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/plugin_runner/messages/events_pb2.py b/plugin_runner/messages/events_pb2.py deleted file mode 100644 index 9bd1615e..00000000 --- a/plugin_runner/messages/events_pb2.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: messages/events.proto -# Protobuf Python Version: 4.25.0 -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -from google.protobuf.internal import builder as _builder -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from messages import effects_pb2 as messages_dot_effects__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15messages/events.proto\x12\x06\x63\x61nvas\x1a\x16messages/effects.proto\"8\n\x05\x45vent\x12\x1f\n\x04type\x18\x01 \x01(\x0e\x32\x11.canvas.EventType\x12\x0e\n\x06target\x18\x02 \x01(\t\"A\n\rEventResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x1f\n\x07\x65\x66\x66\x65\x63ts\x18\x02 \x03(\x0b\x32\x0e.canvas.Effect*\x95\x0c\n\tEventType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1f\n\x1b\x41LLERGY_INTOLERANCE_CREATED\x10\x01\x12\x1f\n\x1b\x41LLERGY_INTOLERANCE_UPDATED\x10\x02\x12\x16\n\x12\x41PPOINTMENT_BOOKED\x10\x03\x12\x18\n\x14\x41PPOINTMENT_CANCELED\x10\x04\x12\x1a\n\x16\x41PPOINTMENT_CHECKED_IN\x10\x05\x12\x17\n\x13\x41PPOINTMENT_CREATED\x10\x06\x12\x19\n\x15\x41PPOINTMENT_NO_SHOWED\x10\x07\x12\x1b\n\x17\x41PPOINTMENT_RESCHEDULED\x10\x08\x12\x18\n\x14\x41PPOINTMENT_RESTORED\x10\t\x12\x17\n\x13\x41PPOINTMENT_UPDATED\x10\n\x12\x1d\n\x19\x42ILLING_LINE_ITEM_CREATED\x10\x0b\x12\x1d\n\x19\x42ILLING_LINE_ITEM_UPDATED\x10\x0c\x12\x16\n\x12\x43ONDITION_ASSESSED\x10\r\x12\x15\n\x11\x43ONDITION_CREATED\x10\x0e\x12\x16\n\x12\x43ONDITION_RESOLVED\x10\x0f\x12\x15\n\x11\x43ONDITION_UPDATED\x10\x10\x12\x13\n\x0f\x43ONSENT_CREATED\x10\x11\x12\x13\n\x0f\x43ONSENT_DELETED\x10\x12\x12\x13\n\x0f\x43ONSENT_UPDATED\x10\x13\x12\x14\n\x10\x43OVERAGE_CREATED\x10\x14\x12\x14\n\x10\x43OVERAGE_UPDATED\x10\x15\x12\x15\n\x11\x45NCOUNTER_CREATED\x10\x16\x12\x15\n\x11\x45NCOUNTER_UPDATED\x10\x17\x12\x1a\n\x16\x45XTERNAL_EVENT_CREATED\x10\x18\x12\x1a\n\x16\x45XTERNAL_EVENT_UPDATED\x10\x19\x12\x1a\n\x16IMAGING_REPORT_CREATED\x10\x1a\x12\x1a\n\x16IMAGING_REPORT_UPDATED\x10\x1b\x12\x18\n\x14IMMUNIZATION_CREATED\x10\x1c\x12\"\n\x1eIMMUNIZATION_STATEMENT_CREATED\x10\x1d\x12\"\n\x1eIMMUNIZATION_STATEMENT_UPDATED\x10\x1e\x12\x18\n\x14IMMUNIZATION_UPDATED\x10\x1f\x12\x17\n\x13INSTRUCTION_CREATED\x10 \x12\x17\n\x13INSTRUCTION_UPDATED\x10!\x12\x15\n\x11INTERVIEW_CREATED\x10\"\x12\x15\n\x11INTERVIEW_UPDATED\x10#\x12\x15\n\x11LAB_ORDER_CREATED\x10$\x12\x15\n\x11LAB_ORDER_UPDATED\x10%\x12\x16\n\x12LAB_REPORT_CREATED\x10&\x12\x16\n\x12LAB_REPORT_UPDATED\x10\'\x12 \n\x1cMEDICATION_LIST_ITEM_CREATED\x10(\x12 \n\x1cMEDICATION_LIST_ITEM_UPDATED\x10)\x12\x13\n\x0fMESSAGE_CREATED\x10*\x12\x13\n\x0fPATIENT_CREATED\x10+\x12\x13\n\x0fPATIENT_UPDATED\x10,\x12\x18\n\x14PRESCRIPTION_CREATED\x10-\x12\x18\n\x14PRESCRIPTION_UPDATED\x10.\x12\x1b\n\x17REFERRAL_REPORT_CREATED\x10/\x12\x1b\n\x17REFERRAL_REPORT_UPDATED\x10\x30\x12\x11\n\rTASK_ASSIGNED\x10\x31\x12\x0f\n\x0bTASK_CLOSED\x10\x32\x12\x18\n\x14TASK_COMMENT_CREATED\x10\x33\x12\x18\n\x14TASK_COMMENT_UPDATED\x10\x34\x12\x12\n\x0eTASK_COMPLETED\x10\x35\x12\x10\n\x0cTASK_CREATED\x10\x36\x12\x18\n\x14TASK_LABELS_ADJUSTED\x10\x37\x12\x13\n\x0fTASK_UNASSIGNED\x10\x38\x12\x10\n\x0cTASK_UPDATED\x10\x39\x12\x16\n\x12VITAL_SIGN_CREATED\x10:\x12\x16\n\x12VITAL_SIGN_UPDATED\x10;\x12\x10\n\x0c\x43HART_OPENED\x10<\x12\x16\n\x12\x43OMMAND_ORIGINATED\x10=b\x06proto3') - -_globals = globals() -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.events_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _globals['_EVENTTYPE']._serialized_start=183 - _globals['_EVENTTYPE']._serialized_end=1740 - _globals['_EVENT']._serialized_start=57 - _globals['_EVENT']._serialized_end=113 - _globals['_EVENTRESPONSE']._serialized_start=115 - _globals['_EVENTRESPONSE']._serialized_end=180 -# @@protoc_insertion_point(module_scope) diff --git a/plugin_runner/plugin_runner.py b/plugin_runner/plugin_runner.py index b59d1917..69d66a7f 100644 --- a/plugin_runner/plugin_runner.py +++ b/plugin_runner/plugin_runner.py @@ -5,9 +5,9 @@ import grpc -from messages.effects_pb2 import Effect -from messages.events_pb2 import EventResponse, EventType -from services.plugin_runner_pb2_grpc import PluginRunnerServicer, add_PluginRunnerServicer_to_server +from generated.messages.effects_pb2 import Effect +from generated.messages.events_pb2 import EventResponse, EventType +from generated.services.plugin_runner_pb2_grpc import PluginRunnerServicer, add_PluginRunnerServicer_to_server class PluginRunner(PluginRunnerServicer): diff --git a/protobufs/generate_protobufs.sh b/protobufs/generate_protobufs.sh index a432383b..49aa7e74 100755 --- a/protobufs/generate_protobufs.sh +++ b/protobufs/generate_protobufs.sh @@ -1,4 +1,4 @@ #! /bin/sh -# poetry run python -m grpc_tools.protoc -I=protobufs/ --python_out=plugin_runner/ --pyi_out=plugin_runner/ --grpc_python_out=plugin_runner/ protobufs/**/*.proto -python -m grpc_tools.protoc -I=protobufs/ --python_out=plugin_runner/ --pyi_out=plugin_runner/ --grpc_python_out=plugin_runner/ protobufs/**/*.proto +# poetry run python -m grpc_tools.protoc -I=protobufs/ --python_out=plugin_runner/ --pyi_out=plugin_runner/ --grpc_python_out=plugin_runner/ protobufs/generated/**/*.proto +python -m grpc_tools.protoc -I=protobufs/ --python_out=plugin_runner/ --pyi_out=plugin_runner/ --grpc_python_out=plugin_runner/ protobufs/generated/**/*.proto diff --git a/protobufs/messages/effects.proto b/protobufs/generated/messages/effects.proto similarity index 100% rename from protobufs/messages/effects.proto rename to protobufs/generated/messages/effects.proto diff --git a/protobufs/messages/events.proto b/protobufs/generated/messages/events.proto similarity index 97% rename from protobufs/messages/events.proto rename to protobufs/generated/messages/events.proto index 03d163a3..7f411340 100644 --- a/protobufs/messages/events.proto +++ b/protobufs/generated/messages/events.proto @@ -1,6 +1,6 @@ syntax = 'proto3'; -import "messages/effects.proto"; +import "generated/messages/effects.proto"; package canvas; diff --git a/protobufs/services/plugin_runner.proto b/protobufs/generated/services/plugin_runner.proto similarity index 74% rename from protobufs/services/plugin_runner.proto rename to protobufs/generated/services/plugin_runner.proto index e1922d7e..a9bda501 100644 --- a/protobufs/services/plugin_runner.proto +++ b/protobufs/generated/services/plugin_runner.proto @@ -1,6 +1,6 @@ syntax = 'proto3'; -import "messages/events.proto"; +import "generated/messages/events.proto"; package canvas;