From b20cff45fbbe70278383b09ecec5a1a2dd0b5eed Mon Sep 17 00:00:00 2001 From: purplenicole730 Date: Mon, 9 Dec 2024 17:08:29 +0000 Subject: [PATCH] Bump version to 0.35.0 --- src/viam/app/data_client.py | 10 +++++++--- src/viam/version_metadata.py | 2 +- tests/mocks/services.py | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/viam/app/data_client.py b/src/viam/app/data_client.py index 41745def3..a00e69a4c 100644 --- a/src/viam/app/data_client.py +++ b/src/viam/app/data_client.py @@ -300,7 +300,9 @@ async def tabular_data_by_mql(self, organization_id: str, mql_binary: List[bytes response: TabularDataByMQLResponse = await self._data_client.TabularDataByMQL(request, metadata=self._metadata) return [bson.decode(bson_bytes) for bson_bytes in response.raw_data] - async def get_latest_tabular_data(self, part_id: str, resource_name: str, resource_subtype: str, method_name: str) -> Optional[Tuple[datetime, datetime, Dict[str, ValueTypes]]]: + async def get_latest_tabular_data( + self, part_id: str, resource_name: str, resource_subtype: str, method_name: str + ) -> Optional[Tuple[datetime, datetime, Dict[str, ValueTypes]]]: """Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year. :: @@ -328,11 +330,13 @@ async def get_latest_tabular_data(self, part_id: str, resource_name: str, resour For more information, see `Data Client API `_. """ - request = GetLatestTabularDataRequest(part_id=part_id, resource_name=resource_name, resource_subtype=resource_subtype, method_name=method_name) + request = GetLatestTabularDataRequest( + part_id=part_id, resource_name=resource_name, resource_subtype=resource_subtype, method_name=method_name + ) response: GetLatestTabularDataResponse = await self._data_client.GetLatestTabularData(request, metadata=self._metadata) if not response.payload: return None - return response.time_captured.ToDatetime(), response.time_synced.ToDatetime(), struct_to_dict(response.payload) + return response.time_captured.ToDatetime(), response.time_synced.ToDatetime(), struct_to_dict(response.payload) async def binary_data_by_filter( self, diff --git a/src/viam/version_metadata.py b/src/viam/version_metadata.py index 4b2856709..f1da51596 100644 --- a/src/viam/version_metadata.py +++ b/src/viam/version_metadata.py @@ -1,4 +1,4 @@ -__version__ = "0.34.0" +__version__ = "0.35.0" API_VERSION = "v0.1.367" SDK_VERSION = __version__ diff --git a/tests/mocks/services.py b/tests/mocks/services.py index 3b74313db..8c4834f73 100644 --- a/tests/mocks/services.py +++ b/tests/mocks/services.py @@ -1011,9 +1011,10 @@ async def GetLatestTabularData(self, stream: Stream[GetLatestTabularDataRequest, self.resource_subtype = request.resource_subtype self.method_name = request.method_name timestamp = datetime_to_timestamp(datetime(2024, 12, 25)) - data=dict_to_struct(self.tabular_response[0].data) + data = dict_to_struct(self.tabular_response[0].data) await stream.send_message(GetLatestTabularDataResponse(time_captured=timestamp, time_synced=timestamp, payload=data)) + class MockDataset(DatasetServiceBase): def __init__(self, create_response: str, datasets_response: Sequence[Dataset]): self.create_response = create_response