Skip to content

Commit 1f0fc76

Browse files
committed
Bump version to 0.4.4
1 parent 8666bad commit 1f0fc76

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "viam-sdk"
3-
version = "0.4.4rc1"
3+
version = "0.4.4"
44
description = "Viam Robotics Python SDK"
55
authors = [ "Naveed <naveed@viam.com>" ]
66
license = "Apache-2.0"

src/viam/app/data/client.py

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from pathlib import Path
22
from typing import Any, List, Mapping, Optional
33

4-
from grpclib.client import Channel
5-
from google.protobuf.timestamp_pb2 import Timestamp
64
from google.protobuf.struct_pb2 import Struct
5+
from google.protobuf.timestamp_pb2 import Timestamp
6+
from grpclib.client import Channel
77

88
from viam import logging
9-
from viam.utils import struct_to_dict
109
from viam.proto.app.data import (
1110
AddTagsToBinaryDataByFilterRequest,
1211
AddTagsToBinaryDataByFilterResponse,
@@ -38,17 +37,18 @@
3837
TagsByFilterResponse,
3938
)
4039
from viam.proto.app.datasync import (
41-
DataSyncServiceStub,
42-
FileData,
43-
SensorData,
44-
UploadMetadata,
4540
DataCaptureUploadRequest,
4641
DataCaptureUploadResponse,
42+
DataSyncServiceStub,
43+
DataType,
44+
FileData,
4745
FileUploadRequest,
4846
FileUploadResponse,
49-
DataType,
50-
SensorMetadata
47+
SensorData,
48+
SensorMetadata,
49+
UploadMetadata,
5150
)
51+
from viam.utils import struct_to_dict
5252

5353
LOGGER = logging.getLogger(__name__)
5454

@@ -267,8 +267,7 @@ async def remove_tags_from_binary_data_by_ids(self, tags: List[str], binary_ids:
267267
"""
268268
request = RemoveTagsFromBinaryDataByIDsRequest(binary_ids=binary_ids, tags=tags)
269269
response: RemoveTagsFromBinaryDataByIDsResponse = await self._data_client.RemoveTagsFromBinaryDataByIDs(
270-
request,
271-
metadata=self._metadata
270+
request, metadata=self._metadata
272271
)
273272
return response.deleted_count
274273

@@ -288,8 +287,7 @@ async def remove_tags_from_binary_data_by_filter(self, tags: List[str], filter:
288287
filter = filter if filter else Filter()
289288
request = RemoveTagsFromBinaryDataByFilterRequest(filter=filter, tags=tags)
290289
response: RemoveTagsFromBinaryDataByFilterResponse = await self._data_client.RemoveTagsFromBinaryDataByFilter(
291-
request,
292-
metadata=self._metadata
290+
request, metadata=self._metadata
293291
)
294292
return response.deleted_count
295293

@@ -338,7 +336,7 @@ async def binary_data_capture_upload(
338336
method_parameters: Optional[Mapping[str, Any]],
339337
tags: Optional[List[str]],
340338
timestamps: Optional[tuple[Timestamp, Timestamp]],
341-
binary_data: bytes
339+
binary_data: bytes,
342340
) -> None:
343341
"""Upload binary sensor data.
344342
@@ -365,7 +363,7 @@ async def binary_data_capture_upload(
365363
time_received=timestamps[1] if timestamps[1] else None,
366364
),
367365
struct=None, # Used for tabular data.
368-
binary=binary_data
366+
binary=binary_data,
369367
)
370368
metadata = UploadMetadata(
371369
part_id=part_id,
@@ -389,7 +387,7 @@ async def tabular_data_capture_upload(
389387
method_parameters: Optional[Mapping[str, Any]],
390388
tags: Optional[List[str]],
391389
timestamps: Optional[List[tuple[Timestamp, Timestamp]]],
392-
tabular_data: List[Mapping[str, Any]]
390+
tabular_data: List[Mapping[str, Any]],
393391
) -> None:
394392
"""Upload tabular sensor data.
395393
@@ -425,9 +423,9 @@ async def tabular_data_capture_upload(
425423
sensor_contents[i] = SensorData(
426424
metadata=SensorMetadata(
427425
time_requested=timestamps[i][0] if timestamps and timestamps[i][0] else None,
428-
time_received=timestamps[i][1] if timestamps and timestamps[i][1] else None
426+
time_received=timestamps[i][1] if timestamps and timestamps[i][1] else None,
429427
),
430-
struct=s
428+
struct=s,
431429
)
432430

433431
metadata = UploadMetadata(
@@ -458,7 +456,7 @@ async def file_upload(
458456
method_parameters: Optional[Mapping[str, Any]],
459457
file_extension: Optional[str],
460458
tags: Optional[List[str]],
461-
data: Optional[bytes]
459+
data: Optional[bytes],
462460
) -> None:
463461
"""Upload arbitrary file data.
464462
@@ -501,7 +499,7 @@ async def file_upload_from_path(
501499
method_name: Optional[str],
502500
method_parameters: Optional[Mapping[str, Any]],
503501
tags: Optional[List[str]],
504-
filepath: str
502+
filepath: str,
505503
) -> None:
506504
"""Upload arbitrary file data.
507505

0 commit comments

Comments
 (0)