Skip to content

Commit

Permalink
rc-0.5.1 (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 5, 2023
1 parent a37a992 commit 47ee8e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 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.5.0"
version = "0.5.1"
description = "Viam Robotics Python SDK"
authors = [ "Naveed <[email protected]>" ]
license = "Apache-2.0"
Expand Down
18 changes: 5 additions & 13 deletions src/viam/components/camera/camera.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import abc
from typing import Final, List, NamedTuple, Optional, Tuple, Union, Any, Dict
from typing import Any, Dict, Final, List, NamedTuple, Optional, Tuple, Union

from PIL.Image import Image

Expand Down Expand Up @@ -36,12 +36,7 @@ class Properties(NamedTuple):

@abc.abstractmethod
async def get_image(
self,
mime_type: str = "",
*,
extra: Optional[Dict[str, Any]] = None,
timeout: Optional[float] = None,
**kwargs
self, mime_type: str = "", *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs
) -> Union[Image, RawImage]:
"""Get the next image from the camera as an Image or RawImage.
Be sure to close the image when finished.
Expand Down Expand Up @@ -73,12 +68,9 @@ async def get_images(self, *, timeout: Optional[float] = None, **kwargs) -> Tupl
...

@abc.abstractmethod
async def get_point_cloud(self,
*,
extra: Optional[Dict[str, Any]] = None,
timeout: Optional[float] = None,
**kwargs
) -> Tuple[bytes, str]:
async def get_point_cloud(
self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs
) -> Tuple[bytes, str]:
"""
Get the next point cloud from the camera. This will be
returned as bytes with a mimetype describing
Expand Down
9 changes: 3 additions & 6 deletions src/viam/components/camera/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ def __init__(self, name: str, channel: Channel):
self.client = CameraServiceStub(channel)
super().__init__(name)

async def get_image(self,
mime_type: str = "",
*,
extra: Optional[Dict[str, Any]] = None,
timeout: Optional[float] = None
) -> Union[Image.Image, RawImage]:
async def get_image(
self, mime_type: str = "", *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None
) -> Union[Image.Image, RawImage]:
if extra is None:
extra = {}
request = GetImageRequest(name=self.name, mime_type=mime_type, extra=dict_to_struct(extra))
Expand Down

0 comments on commit 47ee8e3

Please sign in to comment.