standardbots 2.20231204.22__tar.gz → 2.20231218.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of standardbots might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: standardbots
3
- Version: 2.20231204.22
3
+ Version: 2.20231218.2
4
4
  Summary: Standard Bots RO1 Robotics API
5
5
  Home-page:
6
6
  Author: Standard Bots Support
@@ -13,7 +13,7 @@
13
13
  from setuptools import setup, find_packages # noqa: H301
14
14
 
15
15
  NAME = "standardbots"
16
- VERSION = "2.20231204.22"
16
+ VERSION = "2.20231218.2"
17
17
  # To install the library, run the following
18
18
  #
19
19
  # python setup.py install
@@ -880,7 +880,7 @@ class Status:
880
880
  """
881
881
  Get the current health of the robot
882
882
  """
883
- path = "/api/v1/health"
883
+ path = "/api/v1/status/health"
884
884
  response = self._request_manager.request(
885
885
  "GET",
886
886
  path,
@@ -703,6 +703,51 @@ def parse_status_health_enum(data: object) -> StatusHealthEnum:
703
703
  def serialize_status_health_enum(data: Union[StatusHealthEnum, str]) -> object:
704
704
  return StatusHealthEnum(data).value
705
705
 
706
+ @dataclass
707
+ class StatusVersionData:
708
+ """Version Data"""
709
+ id: Union[str, None] = None
710
+ name: Union[str, None] = None
711
+
712
+ def validate_id(self, value: str) -> Tuple[bool, str]:
713
+ if value is None:
714
+ return [True, ""]
715
+
716
+ if not isinstance(value, str):
717
+ return [False, "id must be of type str for StatusVersionData, got " + type(value).__name__]
718
+
719
+ return [True, ""]
720
+
721
+ def validate_name(self, value: str) -> Tuple[bool, str]:
722
+ if value is None:
723
+ return [True, ""]
724
+
725
+ if not isinstance(value, str):
726
+ return [False, "name must be of type str for StatusVersionData, got " + type(value).__name__]
727
+
728
+ return [True, ""]
729
+
730
+ def __post_init__(self):
731
+ # Type check incoming model - raise error if invalid (required or wrong type)
732
+ is_valid, error_str = self.validate_id(self.id)
733
+ if not is_valid:
734
+ raise TypeError(error_str)
735
+ is_valid, error_str = self.validate_name(self.name)
736
+ if not is_valid:
737
+ raise TypeError(error_str)
738
+
739
+ def parse_status_version_data(data: object):
740
+ return StatusVersionData(
741
+ id=parse_str(data["id"]) if "id" in data else None,
742
+ name=parse_str(data["name"]) if "name" in data else None,
743
+ )
744
+
745
+ def serialize_status_version_data(data: StatusVersionData) -> object:
746
+ return {
747
+ "id": None if data.id is None else serialize_str(data.id),
748
+ "name": None if data.name is None else serialize_str(data.name),
749
+ }
750
+
706
751
  @dataclass
707
752
  class ArmPositionUpdateFailureEvent:
708
753
  """Move robot event when movement failed"""
@@ -1199,6 +1244,7 @@ def serialize_play_routine_request(data: PlayRoutineRequest) -> object:
1199
1244
  class StatusHealthResponse:
1200
1245
  """Status Health Response"""
1201
1246
  health: Union[StatusHealthEnum, None] = None
1247
+ build: Union[StatusVersionData, None] = None
1202
1248
 
1203
1249
  def validate_health(self, value: StatusHealthEnum) -> Tuple[bool, str]:
1204
1250
  if value is None:
@@ -1209,20 +1255,34 @@ class StatusHealthResponse:
1209
1255
 
1210
1256
  return [True, ""]
1211
1257
 
1258
+ def validate_build(self, value: StatusVersionData) -> Tuple[bool, str]:
1259
+ if value is None:
1260
+ return [True, ""]
1261
+
1262
+ if not isinstance(value, StatusVersionData):
1263
+ return [False, "build must be of type StatusVersionData for StatusHealthResponse, got " + type(value).__name__]
1264
+
1265
+ return [True, ""]
1266
+
1212
1267
  def __post_init__(self):
1213
1268
  # Type check incoming model - raise error if invalid (required or wrong type)
1214
1269
  is_valid, error_str = self.validate_health(self.health)
1215
1270
  if not is_valid:
1216
1271
  raise TypeError(error_str)
1272
+ is_valid, error_str = self.validate_build(self.build)
1273
+ if not is_valid:
1274
+ raise TypeError(error_str)
1217
1275
 
1218
1276
  def parse_status_health_response(data: object):
1219
1277
  return StatusHealthResponse(
1220
1278
  health=parse_status_health_enum(data["health"]) if "health" in data else None,
1279
+ build=parse_status_version_data(data["build"]) if "build" in data else None,
1221
1280
  )
1222
1281
 
1223
1282
  def serialize_status_health_response(data: StatusHealthResponse) -> object:
1224
1283
  return {
1225
1284
  "health": None if data.health is None else serialize_status_health_enum(data.health),
1285
+ "build": None if data.build is None else serialize_status_version_data(data.build),
1226
1286
  }
1227
1287
 
1228
1288
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: standardbots
3
- Version: 2.20231204.22
3
+ Version: 2.20231218.2
4
4
  Summary: Standard Bots RO1 Robotics API
5
5
  Home-page:
6
6
  Author: Standard Bots Support