Skip to content

Commit f47b253

Browse files
github-actions[bot]viambotnjooma
authored
Automated Protos Update (#527)
Co-authored-by: viambot <[email protected]> Co-authored-by: Naveed Jooma <[email protected]>
1 parent 0b087a4 commit f47b253

38 files changed

+1669
-1366
lines changed

.vscode/settings.json

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
{
2-
"[python]": {
3-
"editor.defaultFormatter": "ms-python.black-formatter",
4-
"editor.formatOnSave": true,
5-
},
6-
"python.linting.flake8Enabled": true,
7-
"editor.formatOnSave": true,
8-
"python.analysis.typeCheckingMode": "basic",
9-
"python.linting.ignorePatterns": [
10-
"**/site-packages/**/*.py",
11-
".vscode/*.py",
12-
"gen/**/*",
13-
"viam/proto/**/*"
14-
],
15-
"files.trimTrailingWhitespace": true,
16-
"files.insertFinalNewline": true,
17-
"editor.rulers": [
18-
{
19-
"column": 140,
20-
"color": "#777777"
21-
}
22-
],
23-
"python.formatting.provider": "black",
24-
"cSpell.words": [
25-
"frombytes",
26-
"grpclib",
27-
"klass",
28-
"pointcloud",
29-
"segmenters",
30-
"TFLITE",
31-
"tobytes",
32-
"viam"
33-
],
34-
"isort.args": [
35-
"-l 140 --profile black"
36-
],
2+
"[python]": {
3+
"editor.defaultFormatter": "ms-python.black-formatter",
4+
"editor.formatOnSave": true
5+
},
6+
"python.linting.flake8Enabled": true,
7+
"editor.formatOnSave": true,
8+
"python.analysis.typeCheckingMode": "basic",
9+
"python.linting.ignorePatterns": [
10+
"**/site-packages/**/*.py",
11+
".vscode/*.py",
12+
"gen/**/*",
13+
"viam/proto/**/*"
14+
],
15+
"files.trimTrailingWhitespace": true,
16+
"files.insertFinalNewline": true,
17+
"editor.rulers": [
18+
{
19+
"column": 140,
20+
"color": "#777777"
21+
}
22+
],
23+
"python.formatting.provider": "black",
24+
"cSpell.words": [
25+
"frombytes",
26+
"grpclib",
27+
"klass",
28+
"pointcloud",
29+
"RSDK",
30+
"segmenters",
31+
"TFLITE",
32+
"tobytes",
33+
"viam"
34+
],
35+
"isort.args": ["-l 140 --profile black"]
3736
}

docs/examples/_server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@
110110
Location,
111111
LocationAuthRequest,
112112
LocationAuthResponse,
113-
)
114-
from viam.proto.app import LogEntry as LogEntryPB
115-
from viam.proto.app import (
116113
MarkPartAsMainRequest,
117114
MarkPartAsMainResponse,
118115
MarkPartForRestartRequest,
@@ -208,6 +205,7 @@
208205
StreamingDataCaptureUploadRequest,
209206
StreamingDataCaptureUploadResponse,
210207
)
208+
from viam.proto.common import LogEntry as LogEntryPB
211209
from viam.utils import datetime_to_timestamp, dict_to_struct, value_to_primitive
212210

213211

poetry.lock

Lines changed: 605 additions & 569 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/viam/app/_logs.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ class _LogsStream(Protocol[LogsType]):
1414
async def next(self) -> LogsType:
1515
...
1616

17-
async def close(self):
18-
...
19-
2017
def __aiter__(self) -> AsyncIterator:
2118
...
2219

@@ -38,6 +35,3 @@ def __aiter__(self):
3835

3936
async def __anext__(self) -> LogsType:
4037
return await self._stream.__anext__()
41-
42-
async def close(self):
43-
return await super().close()

src/viam/app/app_client.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@
8484
LocationAuth,
8585
LocationAuthRequest,
8686
LocationAuthResponse,
87-
)
88-
from viam.proto.app import LogEntry as LogEntryPB
89-
from viam.proto.app import (
9087
MarkPartAsMainRequest,
9188
MarkPartForRestartRequest,
9289
Model,
@@ -129,6 +126,7 @@
129126
UploadModuleFileRequest,
130127
Visibility,
131128
)
129+
from viam.proto.common import LogEntry as LogEntryPB
132130
from viam.utils import datetime_to_timestamp, dict_to_struct, struct_to_dict
133131

134132
LOGGER = logging.getLogger(__name__)
@@ -319,7 +317,7 @@ def from_proto(cls, robot_part_history_entry: RobotPartHistoryEntryPB) -> Self:
319317
"""Create a `RobotPartHistoryEntry` from the .proto defined `RobotPartHistoryEntry`.
320318
321319
Args:
322-
robo_part_history_entry (viam.proto.app.RobotPartHistoryEntry): The object to copy from.
320+
robot_part_history_entry (viam.proto.app.RobotPartHistoryEntry): The object to copy from.
323321
324322
Returns:
325323
RobotPartHistoryEntry: The `RobotPartHistoryEntry`.
@@ -615,7 +613,7 @@ async def delete_organization_invite(self, email: str) -> None:
615613
await self._app_client.DeleteOrganizationInvite(request, metadata=self._metadata)
616614

617615
async def resend_organization_invite(self, email: str) -> OrganizationInvite:
618-
"""Resends a pending organization invite email.
616+
"""Re-sends a pending organization invite email.
619617
620618
Args:
621619
email (str): The email address associated with the invite.
@@ -906,16 +904,16 @@ async def _get_robot_part_logs(self, robot_part_id: str, filter: str, errors_onl
906904
async def tail_robot_part_logs(
907905
self, robot_part_id: str, errors_only: bool = True, filter: Optional[str] = None
908906
) -> _LogsStream[List[LogEntry]]:
909-
"""Get an asynchronous iterator that recieves live robot part logs.
907+
"""Get an asynchronous iterator that receives live robot part logs.
910908
911909
Args:
912-
robot_part_id (str): ID of the robot part to retrieve lgos from.
910+
robot_part_id (str): ID of the robot part to retrieve logs from.
913911
errors_only (bool): Boolean specifying whether or not to only include error logs. Defaults to True.
914912
filter (Optional[str]): Only include logs with messages that contain the string `filter`. Defaults to empty string "" (i.e., no
915913
filter).
916914
917915
Returns:
918-
_LogsStream[List[LogEntry]]: The asynchronous iterator recieving live robot part logs.
916+
_LogsStream[List[LogEntry]]: The asynchronous iterator receiving live robot part logs.
919917
"""
920918

921919
async def read() -> AsyncIterator[List[LogEntry]]:
@@ -1124,7 +1122,7 @@ async def list_fragments(self, show_public: bool = True) -> List[Fragment]:
11241122
"""Get a list of fragments under the currently authed-to organization.
11251123
11261124
Args:
1127-
show_public: Optional boolean specifiying whether or not to only show public fragments. If True, only public fragments will
1125+
show_public: Optional boolean specifying whether or not to only show public fragments. If True, only public fragments will
11281126
return. If False, only private fragments will return. Defaults to True.
11291127
11301128
Returns:

src/viam/components/audio_input/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def Properties(self, stream: Stream[PropertiesRequest, PropertiesResponse]
5151
response = (await audio_input.get_properties(timeout=timeout, metadata=stream.metadata)).proto
5252
await stream.send_message(response)
5353

54-
async def Record(self, stream: Stream[RecordRequest, HttpBody]) -> None: # pyright: ignore [reportGeneralTypeIssues]
54+
async def Record(self, stream: Stream[RecordRequest, HttpBody]) -> None: # pyright: ignore [reportInvalidTypeForm]
5555
raise NotSupportedError("Recording audio input is not supported").grpc_error
5656

5757
# TODO: Eventually implement recording

src/viam/components/camera/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def GetImages(self, stream: Stream[GetImagesRequest, GetImagesResponse]) -
8080
response = GetImagesResponse(images=img_bytes_lst, response_metadata=metadata)
8181
await stream.send_message(response)
8282

83-
async def RenderFrame(self, stream: Stream[RenderFrameRequest, HttpBody]) -> None:
83+
async def RenderFrame(self, stream: Stream[RenderFrameRequest, HttpBody]) -> None: # pyright: ignore [reportInvalidTypeForm]
8484
request = await stream.recv_message()
8585
assert request is not None
8686
name = request.name

0 commit comments

Comments
 (0)