@@ -1116,9 +1116,9 @@ async def tabular_data_capture_upload(
11161116 component_type : str ,
11171117 component_name : str ,
11181118 method_name : str ,
1119+ data_request_times : List [Tuple [datetime , datetime ]],
11191120 method_parameters : Optional [Mapping [str , Any ]] = None ,
11201121 tags : Optional [List [str ]] = None ,
1121- data_request_times : Optional [List [Tuple [datetime , datetime ]]] = None ,
11221122 ) -> str :
11231123 """Upload tabular sensor data.
11241124
@@ -1132,7 +1132,7 @@ async def tabular_data_capture_upload(
11321132
11331133 file_id = await data_client.tabular_data_capture_upload(
11341134 part_id="INSERT YOUR PART ID",
1135- component_type='motor',
1135+ component_type='rdk:component: motor',
11361136 component_name='left_motor',
11371137 method_name='IsPowered',
11381138 tags=["tag_1", "tag_2"],
@@ -1143,15 +1143,14 @@ async def tabular_data_capture_upload(
11431143 Args:
11441144 tabular_data (List[Mapping[str, Any]]): List of the data to be uploaded, represented tabularly as a collection of dictionaries.
11451145 part_id (str): Part ID of the component used to capture the data.
1146- component_type (str): Type of the component used to capture the data (for example, "movement_sensor").
1146+ component_type (str): Type of the component used to capture the data (for example, "rdk:component: movement_sensor").
11471147 component_name (str): Name of the component used to capture the data.
11481148 method_name (str): Name of the method used to capture the data.
1149+ data_request_times (List[Tuple[datetime.datetime, datetime.datetime]]): List of tuples, each containing `datetime` objects
1150+ denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor. Passing a list of
1151+ tabular data and Timestamps with length n > 1 will result in n datapoints being uploaded, all tied to the same metadata.
11491152 method_parameters (Optional[Mapping[str, Any]]): Optional dictionary of method parameters. No longer in active use.
11501153 tags (Optional[List[str]]): Optional list of tags to allow for tag-based data filtering when retrieving data.
1151- data_request_times (Optional[List[Tuple[datetime.datetime, datetime.datetime]]]): Optional list of tuples, each containing
1152- `datetime` objects denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor.
1153- Passing a list of tabular data and Timestamps with length n > 1 will result in n datapoints being uploaded, all tied to the
1154- same metadata.
11551154
11561155 Raises:
11571156 GRPCError: If an invalid part ID is passed.
@@ -1164,9 +1163,8 @@ async def tabular_data_capture_upload(
11641163 For more information, see `Data Client API <https://docs.viam.com/appendix/apis/data-client/>`_.
11651164 """
11661165 sensor_contents = []
1167- if data_request_times :
1168- if len (data_request_times ) != len (tabular_data ):
1169- raise ValueError ("data_request_times and tabular_data lengths must be equal." )
1166+ if len (data_request_times ) != len (tabular_data ):
1167+ raise ValueError ("data_request_times and tabular_data lengths must be equal." )
11701168
11711169 for idx , tab in enumerate (tabular_data ):
11721170 s = Struct ()
0 commit comments