Skip to content

Commit

Permalink
Automated Protos Update (#806)
Browse files Browse the repository at this point in the history
Co-authored-by: viambot <[email protected]>
  • Loading branch information
github-actions[bot] and viambot authored Dec 23, 2024
1 parent fbc1ce0 commit bd3ab37
Show file tree
Hide file tree
Showing 58 changed files with 411 additions and 252 deletions.
13 changes: 9 additions & 4 deletions src/viam/app/data_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,13 @@ async def get_latest_tabular_data(
return response.time_captured.ToDatetime(), response.time_synced.ToDatetime(), struct_to_dict(response.payload)

async def export_tabular_data(
self, part_id: str, resource_name: str, resource_subtype: str, method_name: str, start_time: Optional[datetime] = None, end_time: Optional[datetime] = None
self,
part_id: str,
resource_name: str,
resource_subtype: str,
method_name: str,
start_time: Optional[datetime] = None,
end_time: Optional[datetime] = None,
) -> List[TabularDataPoint]:
"""Obtain unified tabular data and metadata from the specified data source.
Expand Down Expand Up @@ -437,7 +443,7 @@ async def export_tabular_data(
For more information, see `Data Client API <https://docs.viam.com/appendix/apis/data-client/>`_.
"""

interval=CaptureInterval(start=datetime_to_timestamp(start_time), end=datetime_to_timestamp(end_time))
interval = CaptureInterval(start=datetime_to_timestamp(start_time), end=datetime_to_timestamp(end_time))
request = ExportTabularDataRequest(
part_id=part_id, resource_name=resource_name, resource_subtype=resource_subtype, method_name=method_name, interval=interval
)
Expand All @@ -457,12 +463,11 @@ async def export_tabular_data(
part_name=resp.part_name,
method_parameters=struct_to_dict(resp.method_parameters),
tags=list(resp.tags),
payload=struct_to_dict(resp.payload)
payload=struct_to_dict(resp.payload),
)
for resp in response
]


async def binary_data_by_filter(
self,
filter: Optional[Filter] = None,
Expand Down
2 changes: 1 addition & 1 deletion src/viam/gen/app/agent/v1/agent_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/agent/v1/agent.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/agent/v1/agent.proto')
_sym_db = _symbol_database.Default()
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
Expand Down
2 changes: 1 addition & 1 deletion src/viam/gen/app/cloudslam/v1/cloud_slam_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/cloudslam/v1/cloud_slam.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/cloudslam/v1/cloud_slam.proto')
_sym_db = _symbol_database.Default()
from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
Expand Down
2 changes: 1 addition & 1 deletion src/viam/gen/app/data/v1/data_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/data/v1/data.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/data/v1/data.proto')
_sym_db = _symbol_database.Default()
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
Expand Down
2 changes: 1 addition & 1 deletion src/viam/gen/app/dataset/v1/dataset_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/dataset/v1/dataset.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/dataset/v1/dataset.proto')
_sym_db = _symbol_database.Default()
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1capp/dataset/v1/dataset.proto\x12\x13viam.app.dataset.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\x95\x01\n\x07Dataset\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\'\n\x0forganization_id\x18\x03 \x01(\tR\x0eorganizationId\x12=\n\x0ctime_created\x18\x04 \x01(\x0b2\x1a.google.protobuf.TimestampR\x0btimeCreated"S\n\x14CreateDatasetRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\'\n\x0forganization_id\x18\x02 \x01(\tR\x0eorganizationId"\'\n\x15CreateDatasetResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"&\n\x14DeleteDatasetRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x17\n\x15DeleteDatasetResponse":\n\x14RenameDatasetRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name"\x17\n\x15RenameDatasetResponse"N\n#ListDatasetsByOrganizationIDRequest\x12\'\n\x0forganization_id\x18\x01 \x01(\tR\x0eorganizationId"`\n$ListDatasetsByOrganizationIDResponse\x128\n\x08datasets\x18\x01 \x03(\x0b2\x1c.viam.app.dataset.v1.DatasetR\x08datasets",\n\x18ListDatasetsByIDsRequest\x12\x10\n\x03ids\x18\x01 \x03(\tR\x03ids"U\n\x19ListDatasetsByIDsResponse\x128\n\x08datasets\x18\x01 \x03(\x0b2\x1c.viam.app.dataset.v1.DatasetR\x08datasets2\xd2\x04\n\x0eDatasetService\x12f\n\rCreateDataset\x12).viam.app.dataset.v1.CreateDatasetRequest\x1a*.viam.app.dataset.v1.CreateDatasetResponse\x12f\n\rDeleteDataset\x12).viam.app.dataset.v1.DeleteDatasetRequest\x1a*.viam.app.dataset.v1.DeleteDatasetResponse\x12f\n\rRenameDataset\x12).viam.app.dataset.v1.RenameDatasetRequest\x1a*.viam.app.dataset.v1.RenameDatasetResponse\x12\x93\x01\n\x1cListDatasetsByOrganizationID\x128.viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest\x1a9.viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse\x12r\n\x11ListDatasetsByIDs\x12-.viam.app.dataset.v1.ListDatasetsByIDsRequest\x1a..viam.app.dataset.v1.ListDatasetsByIDsResponseB Z\x1ego.viam.com/api/app/dataset/v1b\x06proto3')
Expand Down
2 changes: 1 addition & 1 deletion src/viam/gen/app/datasync/v1/data_sync_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/datasync/v1/data_sync.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/datasync/v1/data_sync.proto')
_sym_db = _symbol_database.Default()
from ....app.data.v1 import data_pb2 as app_dot_data_dot_v1_dot_data__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
Expand Down
1 change: 1 addition & 0 deletions src/viam/gen/app/mlinference/v1/ml_inference_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
if typing.TYPE_CHECKING:
import grpclib.server
from .... import app
from .... import service

class MLInferenceServiceBase(abc.ABC):

Expand Down
17 changes: 9 additions & 8 deletions src/viam/gen/app/mlinference/v1/ml_inference_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/mlinference/v1/ml_inference.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/mlinference/v1/ml_inference.proto')
_sym_db = _symbol_database.Default()
from ....app.data.v1 import data_pb2 as app_dot_data_dot_v1_dot_data__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%app/mlinference/v1/ml_inference.proto\x12\x17viam.app.mlinference.v1\x1a\x16app/data/v1/data.proto"\xd5\x01\n\x13GetInferenceRequest\x12(\n\x10registry_item_id\x18\x01 \x01(\tR\x0eregistryItemId\x122\n\x15registry_item_version\x18\x02 \x01(\tR\x13registryItemVersion\x127\n\tbinary_id\x18\x03 \x01(\x0b2\x1a.viam.app.data.v1.BinaryIDR\x08binaryId\x12\'\n\x0forganization_id\x18\x04 \x01(\tR\x0eorganizationId"\x16\n\x14GetInferenceResponse2\x81\x01\n\x12MLInferenceService\x12k\n\x0cGetInference\x12,.viam.app.mlinference.v1.GetInferenceRequest\x1a-.viam.app.mlinference.v1.GetInferenceResponseB$Z"go.viam.com/api/app/mlinference/v1b\x06proto3')
from ....service.mlmodel.v1 import mlmodel_pb2 as service_dot_mlmodel_dot_v1_dot_mlmodel__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%app/mlinference/v1/ml_inference.proto\x12\x17viam.app.mlinference.v1\x1a\x16app/data/v1/data.proto\x1a service/mlmodel/v1/mlmodel.proto"\xd5\x01\n\x13GetInferenceRequest\x12(\n\x10registry_item_id\x18\x01 \x01(\tR\x0eregistryItemId\x122\n\x15registry_item_version\x18\x02 \x01(\tR\x13registryItemVersion\x127\n\tbinary_id\x18\x03 \x01(\x0b2\x1a.viam.app.data.v1.BinaryIDR\x08binaryId\x12\'\n\x0forganization_id\x18\x04 \x01(\tR\x0eorganizationId"\xa4\x01\n\x14GetInferenceResponse\x12K\n\x0eoutput_tensors\x18\x01 \x01(\x0b2$.viam.service.mlmodel.v1.FlatTensorsR\routputTensors\x12?\n\x0bannotations\x18\x02 \x01(\x0b2\x1d.viam.app.data.v1.AnnotationsR\x0bannotations2\x81\x01\n\x12MLInferenceService\x12k\n\x0cGetInference\x12,.viam.app.mlinference.v1.GetInferenceRequest\x1a-.viam.app.mlinference.v1.GetInferenceResponseB$Z"go.viam.com/api/app/mlinference/v1b\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'app.mlinference.v1.ml_inference_pb2', _globals)
if not _descriptor._USE_C_DESCRIPTORS:
_globals['DESCRIPTOR']._loaded_options = None
_globals['DESCRIPTOR']._serialized_options = b'Z"go.viam.com/api/app/mlinference/v1'
_globals['_GETINFERENCEREQUEST']._serialized_start = 91
_globals['_GETINFERENCEREQUEST']._serialized_end = 304
_globals['_GETINFERENCERESPONSE']._serialized_start = 306
_globals['_GETINFERENCERESPONSE']._serialized_end = 328
_globals['_MLINFERENCESERVICE']._serialized_start = 331
_globals['_MLINFERENCESERVICE']._serialized_end = 460
_globals['_GETINFERENCEREQUEST']._serialized_start = 125
_globals['_GETINFERENCEREQUEST']._serialized_end = 338
_globals['_GETINFERENCERESPONSE']._serialized_start = 341
_globals['_GETINFERENCERESPONSE']._serialized_end = 505
_globals['_MLINFERENCESERVICE']._serialized_start = 508
_globals['_MLINFERENCESERVICE']._serialized_end = 637
19 changes: 18 additions & 1 deletion src/viam/gen/app/mlinference/v1/ml_inference_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ from .... import app
import builtins
import google.protobuf.descriptor
import google.protobuf.message
from .... import service
import typing
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

Expand Down Expand Up @@ -38,7 +39,23 @@ global___GetInferenceRequest = GetInferenceRequest
@typing.final
class GetInferenceResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
OUTPUT_TENSORS_FIELD_NUMBER: builtins.int
ANNOTATIONS_FIELD_NUMBER: builtins.int

def __init__(self) -> None:
@property
def output_tensors(self) -> service.mlmodel.v1.mlmodel_pb2.FlatTensors:
...

@property
def annotations(self) -> app.data.v1.data_pb2.Annotations:
...

def __init__(self, *, output_tensors: service.mlmodel.v1.mlmodel_pb2.FlatTensors | None=..., annotations: app.data.v1.data_pb2.Annotations | None=...) -> None:
...

def HasField(self, field_name: typing.Literal['annotations', b'annotations', 'output_tensors', b'output_tensors']) -> builtins.bool:
...

def ClearField(self, field_name: typing.Literal['annotations', b'annotations', 'output_tensors', b'output_tensors']) -> None:
...
global___GetInferenceResponse = GetInferenceResponse
2 changes: 1 addition & 1 deletion src/viam/gen/app/mltraining/v1/ml_training_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/mltraining/v1/ml_training.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/mltraining/v1/ml_training.proto')
_sym_db = _symbol_database.Default()
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
Expand Down
2 changes: 1 addition & 1 deletion src/viam/gen/app/packages/v1/packages_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'app/packages/v1/packages.proto')
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 1, '', 'app/packages/v1/packages.proto')
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
Expand Down
318 changes: 162 additions & 156 deletions src/viam/gen/app/v1/app_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit bd3ab37

Please sign in to comment.