Skip to content

Commit b932e16

Browse files
Automated Protos Update (#777)
Co-authored-by: viambot <[email protected]>
1 parent f5c2676 commit b932e16

File tree

10 files changed

+642
-319
lines changed

10 files changed

+642
-319
lines changed

src/viam/components/arm/service.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
GetKinematicsResponse,
1010
)
1111
from viam.proto.component.arm import (
12-
UnimplementedArmServiceBase,
1312
GetEndPositionRequest,
1413
GetEndPositionResponse,
1514
GetJointPositionsRequest,
@@ -22,6 +21,7 @@
2221
MoveToPositionResponse,
2322
StopRequest,
2423
StopResponse,
24+
UnimplementedArmServiceBase,
2525
)
2626
from viam.resource.rpc_service_base import ResourceRPCServiceBase
2727
from viam.utils import dict_to_struct, struct_to_dict

src/viam/components/component_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ComponentBase(abc.ABC, ResourceBase):
2727

2828
def __init__(self, name: str, *, logger: Optional[Logger] = None):
2929
self.name = name
30-
self.logger = logger if logger is not None else getLogger(f'{self.SUBTYPE}.{name}')
30+
self.logger = logger if logger is not None else getLogger(f"{self.SUBTYPE}.{name}")
3131

3232
@classmethod
3333
def from_robot(cls, robot: "RobotClient", name: str) -> Self:

src/viam/gen/app/v1/app_grpc.py

+41-1
Large diffs are not rendered by default.

src/viam/gen/app/v1/app_pb2.py

+337-309
Large diffs are not rendered by default.

src/viam/gen/app/v1/app_pb2.pyi

+229-2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,27 @@ FRAGMENT_VISIBILITY_PUBLIC: FragmentVisibility.ValueType
6060
FRAGMENT_VISIBILITY_PUBLIC_UNLISTED: FragmentVisibility.ValueType
6161
global___FragmentVisibility = FragmentVisibility
6262

63+
class _FragmentErrorType:
64+
ValueType = typing.NewType('ValueType', builtins.int)
65+
V: typing_extensions.TypeAlias = ValueType
66+
67+
class _FragmentErrorTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_FragmentErrorType.ValueType], builtins.type):
68+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
69+
FRAGMENT_ERROR_TYPE_UNSPECIFIED: _FragmentErrorType.ValueType
70+
FRAGMENT_ERROR_TYPE_NO_ACCESS: _FragmentErrorType.ValueType
71+
FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED: _FragmentErrorType.ValueType
72+
FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID: _FragmentErrorType.ValueType
73+
FRAGMENT_ERROR_TYPE_CYCLE_DETECTED: _FragmentErrorType.ValueType
74+
75+
class FragmentErrorType(_FragmentErrorType, metaclass=_FragmentErrorTypeEnumTypeWrapper):
76+
...
77+
FRAGMENT_ERROR_TYPE_UNSPECIFIED: FragmentErrorType.ValueType
78+
FRAGMENT_ERROR_TYPE_NO_ACCESS: FragmentErrorType.ValueType
79+
FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED: FragmentErrorType.ValueType
80+
FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID: FragmentErrorType.ValueType
81+
FRAGMENT_ERROR_TYPE_CYCLE_DETECTED: FragmentErrorType.ValueType
82+
global___FragmentErrorType = FragmentErrorType
83+
6384
class _RegistryItemStatus:
6485
ValueType = typing.NewType('ValueType', builtins.int)
6586
V: typing_extensions.TypeAlias = ValueType
@@ -744,6 +765,164 @@ class DeleteOrganizationMemberResponse(google.protobuf.message.Message):
744765
...
745766
global___DeleteOrganizationMemberResponse = DeleteOrganizationMemberResponse
746767

768+
@typing.final
769+
class BillingAddress(google.protobuf.message.Message):
770+
"""Third Party Org Services"""
771+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
772+
ADDRESS_LINE_1_FIELD_NUMBER: builtins.int
773+
ADDRESS_LINE_2_FIELD_NUMBER: builtins.int
774+
CITY_FIELD_NUMBER: builtins.int
775+
STATE_FIELD_NUMBER: builtins.int
776+
ZIPCODE_FIELD_NUMBER: builtins.int
777+
address_line_1: builtins.str
778+
address_line_2: builtins.str
779+
city: builtins.str
780+
state: builtins.str
781+
zipcode: builtins.str
782+
783+
def __init__(self, *, address_line_1: builtins.str=..., address_line_2: builtins.str | None=..., city: builtins.str=..., state: builtins.str=..., zipcode: builtins.str=...) -> None:
784+
...
785+
786+
def HasField(self, field_name: typing.Literal['_address_line_2', b'_address_line_2', 'address_line_2', b'address_line_2']) -> builtins.bool:
787+
...
788+
789+
def ClearField(self, field_name: typing.Literal['_address_line_2', b'_address_line_2', 'address_line_1', b'address_line_1', 'address_line_2', b'address_line_2', 'city', b'city', 'state', b'state', 'zipcode', b'zipcode']) -> None:
790+
...
791+
792+
def WhichOneof(self, oneof_group: typing.Literal['_address_line_2', b'_address_line_2']) -> typing.Literal['address_line_2'] | None:
793+
...
794+
global___BillingAddress = BillingAddress
795+
796+
@typing.final
797+
class EnableBillingServiceRequest(google.protobuf.message.Message):
798+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
799+
ORG_ID_FIELD_NUMBER: builtins.int
800+
BILLING_ADDRESS_FIELD_NUMBER: builtins.int
801+
org_id: builtins.str
802+
803+
@property
804+
def billing_address(self) -> global___BillingAddress:
805+
...
806+
807+
def __init__(self, *, org_id: builtins.str=..., billing_address: global___BillingAddress | None=...) -> None:
808+
...
809+
810+
def HasField(self, field_name: typing.Literal['billing_address', b'billing_address']) -> builtins.bool:
811+
...
812+
813+
def ClearField(self, field_name: typing.Literal['billing_address', b'billing_address', 'org_id', b'org_id']) -> None:
814+
...
815+
global___EnableBillingServiceRequest = EnableBillingServiceRequest
816+
817+
@typing.final
818+
class EnableBillingServiceResponse(google.protobuf.message.Message):
819+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
820+
821+
def __init__(self) -> None:
822+
...
823+
global___EnableBillingServiceResponse = EnableBillingServiceResponse
824+
825+
@typing.final
826+
class UpdateBillingServiceRequest(google.protobuf.message.Message):
827+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
828+
ORG_ID_FIELD_NUMBER: builtins.int
829+
BILLING_ADDRESS_FIELD_NUMBER: builtins.int
830+
BILLING_SUPPORT_EMAIL_FIELD_NUMBER: builtins.int
831+
org_id: builtins.str
832+
billing_support_email: builtins.str
833+
834+
@property
835+
def billing_address(self) -> global___BillingAddress:
836+
...
837+
838+
def __init__(self, *, org_id: builtins.str=..., billing_address: global___BillingAddress | None=..., billing_support_email: builtins.str=...) -> None:
839+
...
840+
841+
def HasField(self, field_name: typing.Literal['billing_address', b'billing_address']) -> builtins.bool:
842+
...
843+
844+
def ClearField(self, field_name: typing.Literal['billing_address', b'billing_address', 'billing_support_email', b'billing_support_email', 'org_id', b'org_id']) -> None:
845+
...
846+
global___UpdateBillingServiceRequest = UpdateBillingServiceRequest
847+
848+
@typing.final
849+
class UpdateBillingServiceResponse(google.protobuf.message.Message):
850+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
851+
852+
def __init__(self) -> None:
853+
...
854+
global___UpdateBillingServiceResponse = UpdateBillingServiceResponse
855+
856+
@typing.final
857+
class DisableBillingServiceRequest(google.protobuf.message.Message):
858+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
859+
ORG_ID_FIELD_NUMBER: builtins.int
860+
org_id: builtins.str
861+
862+
def __init__(self, *, org_id: builtins.str=...) -> None:
863+
...
864+
865+
def ClearField(self, field_name: typing.Literal['org_id', b'org_id']) -> None:
866+
...
867+
global___DisableBillingServiceRequest = DisableBillingServiceRequest
868+
869+
@typing.final
870+
class DisableBillingServiceResponse(google.protobuf.message.Message):
871+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
872+
873+
def __init__(self) -> None:
874+
...
875+
global___DisableBillingServiceResponse = DisableBillingServiceResponse
876+
877+
@typing.final
878+
class OrganizationSetSupportEmailRequest(google.protobuf.message.Message):
879+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
880+
ORG_ID_FIELD_NUMBER: builtins.int
881+
EMAIL_FIELD_NUMBER: builtins.int
882+
org_id: builtins.str
883+
email: builtins.str
884+
885+
def __init__(self, *, org_id: builtins.str=..., email: builtins.str=...) -> None:
886+
...
887+
888+
def ClearField(self, field_name: typing.Literal['email', b'email', 'org_id', b'org_id']) -> None:
889+
...
890+
global___OrganizationSetSupportEmailRequest = OrganizationSetSupportEmailRequest
891+
892+
@typing.final
893+
class OrganizationSetSupportEmailResponse(google.protobuf.message.Message):
894+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
895+
896+
def __init__(self) -> None:
897+
...
898+
global___OrganizationSetSupportEmailResponse = OrganizationSetSupportEmailResponse
899+
900+
@typing.final
901+
class OrganizationGetSupportEmailRequest(google.protobuf.message.Message):
902+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
903+
ORG_ID_FIELD_NUMBER: builtins.int
904+
org_id: builtins.str
905+
906+
def __init__(self, *, org_id: builtins.str=...) -> None:
907+
...
908+
909+
def ClearField(self, field_name: typing.Literal['org_id', b'org_id']) -> None:
910+
...
911+
global___OrganizationGetSupportEmailRequest = OrganizationGetSupportEmailRequest
912+
913+
@typing.final
914+
class OrganizationGetSupportEmailResponse(google.protobuf.message.Message):
915+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
916+
EMAIL_FIELD_NUMBER: builtins.int
917+
email: builtins.str
918+
919+
def __init__(self, *, email: builtins.str=...) -> None:
920+
...
921+
922+
def ClearField(self, field_name: typing.Literal['email', b'email']) -> None:
923+
...
924+
global___OrganizationGetSupportEmailResponse = OrganizationGetSupportEmailResponse
925+
747926
@typing.final
748927
class OrganizationIdentity(google.protobuf.message.Message):
749928
"""Location
@@ -1789,6 +1968,49 @@ class FragmentHistoryEntry(google.protobuf.message.Message):
17891968
...
17901969
global___FragmentHistoryEntry = FragmentHistoryEntry
17911970

1971+
@typing.final
1972+
class FragmentError(google.protobuf.message.Message):
1973+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1974+
ERROR_TYPE_FIELD_NUMBER: builtins.int
1975+
FRAGMENT_ID_FIELD_NUMBER: builtins.int
1976+
DETAIL_FIELD_NUMBER: builtins.int
1977+
error_type: global___FragmentErrorType.ValueType
1978+
fragment_id: builtins.str
1979+
detail: builtins.str
1980+
1981+
def __init__(self, *, error_type: global___FragmentErrorType.ValueType=..., fragment_id: builtins.str=..., detail: builtins.str=...) -> None:
1982+
...
1983+
1984+
def ClearField(self, field_name: typing.Literal['detail', b'detail', 'error_type', b'error_type', 'fragment_id', b'fragment_id']) -> None:
1985+
...
1986+
global___FragmentError = FragmentError
1987+
1988+
@typing.final
1989+
class FragmentTree(google.protobuf.message.Message):
1990+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1991+
ROOT_FRAGMENT_ID_FIELD_NUMBER: builtins.int
1992+
FRAGMENT_MERGE_ORDER_FIELD_NUMBER: builtins.int
1993+
ERROR_FIELD_NUMBER: builtins.int
1994+
root_fragment_id: builtins.str
1995+
1996+
@property
1997+
def fragment_merge_order(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
1998+
...
1999+
2000+
@property
2001+
def error(self) -> global___FragmentError:
2002+
...
2003+
2004+
def __init__(self, *, root_fragment_id: builtins.str=..., fragment_merge_order: collections.abc.Iterable[builtins.str] | None=..., error: global___FragmentError | None=...) -> None:
2005+
...
2006+
2007+
def HasField(self, field_name: typing.Literal['error', b'error']) -> builtins.bool:
2008+
...
2009+
2010+
def ClearField(self, field_name: typing.Literal['error', b'error', 'fragment_merge_order', b'fragment_merge_order', 'root_fragment_id', b'root_fragment_id']) -> None:
2011+
...
2012+
global___FragmentTree = FragmentTree
2013+
17922014
@typing.final
17932015
class ListFragmentsRequest(google.protobuf.message.Message):
17942016
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -2063,15 +2285,20 @@ global___ListMachineFragmentsRequest = ListMachineFragmentsRequest
20632285
class ListMachineFragmentsResponse(google.protobuf.message.Message):
20642286
DESCRIPTOR: google.protobuf.descriptor.Descriptor
20652287
FRAGMENTS_FIELD_NUMBER: builtins.int
2288+
FRAGMENT_TREES_FIELD_NUMBER: builtins.int
20662289

20672290
@property
20682291
def fragments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Fragment]:
20692292
...
20702293

2071-
def __init__(self, *, fragments: collections.abc.Iterable[global___Fragment] | None=...) -> None:
2294+
@property
2295+
def fragment_trees(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FragmentTree]:
20722296
...
20732297

2074-
def ClearField(self, field_name: typing.Literal['fragments', b'fragments']) -> None:
2298+
def __init__(self, *, fragments: collections.abc.Iterable[global___Fragment] | None=..., fragment_trees: collections.abc.Iterable[global___FragmentTree] | None=...) -> None:
2299+
...
2300+
2301+
def ClearField(self, field_name: typing.Literal['fragment_trees', b'fragment_trees', 'fragments', b'fragments']) -> None:
20752302
...
20762303
global___ListMachineFragmentsResponse = ListMachineFragmentsResponse
20772304

src/viam/logging.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def handle_task_result(self, task: asyncio.Task):
8484
def emit(self, record: logging.LogRecord):
8585
assert isinstance(record, logging.LogRecord)
8686
# Fully qualified name of form "{subtype triplet}/{name}", e.g. "rdk:component:arm/myarm"
87-
name = record.name.replace('.', '/')
87+
name = record.name.replace(".", "/")
8888
message = f"{record.filename}:{record.lineno}\t{record.getMessage()}"
8989
stack = f"exc_info: {record.exc_info}, exc_text: {record.exc_text}, stack_info: {record.stack_info}"
9090
time = datetime.fromtimestamp(record.created)
@@ -153,7 +153,7 @@ def addHandlers(logger: logging.Logger, use_default_handlers=False):
153153

154154

155155
def update_log_level(logger: logging.Logger, level: Union[int, str]):
156-
if level == '':
156+
if level == "":
157157
level = LOG_LEVEL
158158
logger.setLevel(level)
159159
for handler in logger.handlers:

0 commit comments

Comments
 (0)