Skip to content

Commit

Permalink
rc-0.4.3 (#342)
Browse files Browse the repository at this point in the history
Co-authored-by: stuqdog <[email protected]>
  • Loading branch information
github-actions[bot] and stuqdog committed Jul 5, 2023
1 parent 67704f1 commit 31399d7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "viam-sdk"
version = "0.4.2"
version = "0.4.3"
description = "Viam Robotics Python SDK"
authors = [ "Naveed <[email protected]>" ]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/viam/app/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Mapping
from typing_extensions import Self

from grpclib.client import Channel
from typing_extensions import Self

from viam import logging
from viam.app.data.client import DataClient
Expand Down
37 changes: 18 additions & 19 deletions src/viam/app/data/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@

from viam import logging
from viam.proto.app.data import (
AddTagsToBinaryDataByIDsRequest,
AddTagsToBinaryDataByIDsResponse,
AddTagsToBinaryDataByFilterRequest,
AddTagsToBinaryDataByFilterResponse,
RemoveTagsFromBinaryDataByIDsRequest,
RemoveTagsFromBinaryDataByIDsResponse,
RemoveTagsFromBinaryDataByFilterRequest,
RemoveTagsFromBinaryDataByFilterResponse,
TagsByFilterRequest,
TagsByFilterResponse,
BoundingBoxLabelsByFilterRequest,
BoundingBoxLabelsByFilterResponse,
AddTagsToBinaryDataByIDsRequest,
AddTagsToBinaryDataByIDsResponse,
BinaryDataByFilterRequest,
BinaryDataByFilterResponse,
BinaryDataByIDsRequest,
BinaryDataByIDsResponse,
BinaryID,
DataServiceStub,
BoundingBoxLabelsByFilterRequest,
BoundingBoxLabelsByFilterResponse,
DataRequest,
DeleteBinaryDataByIDsRequest,
DeleteBinaryDataByIDsResponse,
DataServiceStub,
DeleteBinaryDataByFilterRequest,
DeleteBinaryDataByFilterResponse,
DeleteBinaryDataByIDsRequest,
DeleteBinaryDataByIDsResponse,
DeleteTabularDataByFilterRequest,
DeleteTabularDataByFilterResponse,
Filter,
RemoveTagsFromBinaryDataByFilterRequest,
RemoveTagsFromBinaryDataByFilterResponse,
RemoveTagsFromBinaryDataByIDsRequest,
RemoveTagsFromBinaryDataByIDsResponse,
TabularDataByFilterRequest,
TabularDataByFilterResponse,
TagsByFilterRequest,
TagsByFilterResponse,
)
from viam.proto.app.datasync import DataSyncServiceStub, FileData, SensorData, UploadMetadata

Expand Down Expand Up @@ -92,7 +92,7 @@ async def tabular_data_by_filter(

if dest:
try:
file = open(dest, 'w')
file = open(dest, "w")
file.write(f"{data}")
except Exception as e:
LOGGER.error(f"Failed to write tabular data to file {dest}", exc_info=e)
Expand Down Expand Up @@ -130,7 +130,7 @@ async def binary_data_by_filter(

if dest:
try:
file = open(dest, 'w')
file = open(dest, "w")
file.write(f"{data}")
except Exception as e:
LOGGER.error(f"Failed to write binary data to file {dest}", exc_info=e)
Expand Down Expand Up @@ -158,7 +158,7 @@ async def binary_data_by_ids(
response: BinaryDataByIDsResponse = await self._data_client.BinaryDataByIDs(request, metadata=self._metadata)
if dest:
try:
file = open(dest, 'w')
file = open(dest, "w")
file.write(f"{response.data}")
except Exception as e:
LOGGER.error(f"Failed to write binary data to file {dest}", exc_info=e)
Expand Down Expand Up @@ -251,8 +251,7 @@ async def remove_tags_from_binary_data_by_filter(self, tags: List[str], filter:
filter = filter if filter else Filter()
request = RemoveTagsFromBinaryDataByFilterRequest(filter=filter, tags=tags)
_: RemoveTagsFromBinaryDataByFilterResponse = await self._data_client.RemoveTagsFromBinaryDataByFilter(
request,
metadata=self._metadata
request, metadata=self._metadata
)

async def tags_by_filter(self, filter: Optional[Filter] = None) -> List[str]:
Expand Down Expand Up @@ -292,7 +291,7 @@ async def bounding_box_labels_by_filter(self, filter: Optional[Filter] = None) -
return response.labels

# TODO(RSDK-3637): Implement
async def data_capture_upload(self, metadata: UploadMetadata , sensor_contents: Optional[List[SensorData]] = None) -> None:
async def data_capture_upload(self, metadata: UploadMetadata, sensor_contents: Optional[List[SensorData]] = None) -> None:
raise NotImplementedError()

# TODO(RSDK-3637): Implement
Expand Down
6 changes: 5 additions & 1 deletion src/viam/components/arm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@


async def create_status(component: Arm) -> Status:
(end_position, joint_positions, is_moving,) = await asyncio.gather(
(
end_position,
joint_positions,
is_moving,
) = await asyncio.gather(
component.get_end_position(),
component.get_joint_positions(),
component.is_moving(),
Expand Down

0 comments on commit 31399d7

Please sign in to comment.