cognite-toolkit 0.7.71__py3-none-any.whl → 0.7.72__py3-none-any.whl
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.
- cognite_toolkit/_cdf_tk/client/_toolkit_client.py +0 -2
- cognite_toolkit/_cdf_tk/client/api/robotics_capabilities.py +9 -3
- cognite_toolkit/_cdf_tk/client/api/robotics_data_postprocessing.py +12 -3
- cognite_toolkit/_cdf_tk/client/api/robotics_frames.py +10 -3
- cognite_toolkit/_cdf_tk/client/api/robotics_locations.py +10 -3
- cognite_toolkit/_cdf_tk/client/api/robotics_maps.py +10 -3
- cognite_toolkit/_cdf_tk/client/api/robotics_robots.py +10 -3
- cognite_toolkit/_cdf_tk/client/http_client/_client.py +1 -1
- cognite_toolkit/_cdf_tk/client/testing.py +14 -16
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/robotics.py +154 -160
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml +1 -1
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml +1 -1
- cognite_toolkit/_resources/cdf.toml +1 -1
- cognite_toolkit/_version.py +1 -1
- {cognite_toolkit-0.7.71.dist-info → cognite_toolkit-0.7.72.dist-info}/METADATA +1 -1
- {cognite_toolkit-0.7.71.dist-info → cognite_toolkit-0.7.72.dist-info}/RECORD +18 -28
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/__init__.py +0 -8
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/api.py +0 -20
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/capabilities.py +0 -142
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/data_postprocessing.py +0 -144
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/frames.py +0 -136
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/locations.py +0 -136
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/maps.py +0 -136
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/robots.py +0 -132
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/utlis.py +0 -13
- cognite_toolkit/_cdf_tk/client/resource_classes/legacy/robotics.py +0 -970
- {cognite_toolkit-0.7.71.dist-info → cognite_toolkit-0.7.72.dist-info}/WHEEL +0 -0
- {cognite_toolkit-0.7.71.dist-info → cognite_toolkit-0.7.72.dist-info}/entry_points.txt +0 -0
|
@@ -11,7 +11,6 @@ from cognite_toolkit._cdf_tk.client.api.legacy.extended_files import ExtendedFil
|
|
|
11
11
|
from cognite_toolkit._cdf_tk.client.api.legacy.extended_functions import ExtendedFunctionsAPI
|
|
12
12
|
from cognite_toolkit._cdf_tk.client.api.legacy.extended_raw import ExtendedRawAPI
|
|
13
13
|
from cognite_toolkit._cdf_tk.client.api.legacy.extended_timeseries import ExtendedTimeSeriesAPI
|
|
14
|
-
from cognite_toolkit._cdf_tk.client.api.legacy.robotics import RoboticsAPI as RoboticsLegacyAPI
|
|
15
14
|
from cognite_toolkit._cdf_tk.client.http_client import HTTPClient
|
|
16
15
|
|
|
17
16
|
from .api.assets import AssetsAPI
|
|
@@ -80,7 +79,6 @@ class ToolkitClient(CogniteClient):
|
|
|
80
79
|
self.console = console or Console()
|
|
81
80
|
self.tool = ToolAPI(http_client, self.console)
|
|
82
81
|
self.search = SearchAPI(self._config, self._API_VERSION, self)
|
|
83
|
-
self.robotics = RoboticsLegacyAPI(self._config, self._API_VERSION, self)
|
|
84
82
|
self.dml = DMLAPI(self._config, self._API_VERSION, self)
|
|
85
83
|
self.verify = VerifyAPI(self._config, self._API_VERSION, self)
|
|
86
84
|
self.lookup = LookUpGroup(self._config, self._API_VERSION, self, self.console)
|
|
@@ -53,7 +53,7 @@ class CapabilitiesAPI(CDFResourceAPI[ExternalId, RobotCapabilityRequest, RobotCa
|
|
|
53
53
|
"""
|
|
54
54
|
return self._request_item_response(items, "create")
|
|
55
55
|
|
|
56
|
-
def retrieve(self, items: Sequence[ExternalId]) -> list[RobotCapabilityResponse]:
|
|
56
|
+
def retrieve(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> list[RobotCapabilityResponse]:
|
|
57
57
|
"""Retrieve capabilities from CDF.
|
|
58
58
|
|
|
59
59
|
Args:
|
|
@@ -61,6 +61,8 @@ class CapabilitiesAPI(CDFResourceAPI[ExternalId, RobotCapabilityRequest, RobotCa
|
|
|
61
61
|
Returns:
|
|
62
62
|
List of retrieved RobotCapabilityResponse objects.
|
|
63
63
|
"""
|
|
64
|
+
if ignore_unknown_ids:
|
|
65
|
+
return self._request_item_split_retries(items, method="retrieve")
|
|
64
66
|
return self._request_item_response(items, method="retrieve")
|
|
65
67
|
|
|
66
68
|
def update(
|
|
@@ -77,13 +79,17 @@ class CapabilitiesAPI(CDFResourceAPI[ExternalId, RobotCapabilityRequest, RobotCa
|
|
|
77
79
|
"""
|
|
78
80
|
return self._update(items, mode=mode)
|
|
79
81
|
|
|
80
|
-
def delete(self, items: Sequence[ExternalId]) -> None:
|
|
82
|
+
def delete(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> None:
|
|
81
83
|
"""Delete capabilities from CDF.
|
|
82
84
|
|
|
83
85
|
Args:
|
|
84
86
|
items: List of ExternalId objects to delete.
|
|
87
|
+
ignore_unknown_ids: If True, ignores unknown IDs during deletion.
|
|
85
88
|
"""
|
|
86
|
-
|
|
89
|
+
if ignore_unknown_ids:
|
|
90
|
+
self._request_item_split_retries_no_response(items, "delete")
|
|
91
|
+
else:
|
|
92
|
+
self._request_no_response(items, "delete")
|
|
87
93
|
|
|
88
94
|
def paginate(
|
|
89
95
|
self,
|
|
@@ -64,14 +64,19 @@ class DataPostProcessingAPI(
|
|
|
64
64
|
"""
|
|
65
65
|
return self._request_item_response(items, "create")
|
|
66
66
|
|
|
67
|
-
def retrieve(
|
|
67
|
+
def retrieve(
|
|
68
|
+
self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False
|
|
69
|
+
) -> list[RobotDataPostProcessingResponse]:
|
|
68
70
|
"""Retrieve data post-processing configurations from CDF.
|
|
69
71
|
|
|
70
72
|
Args:
|
|
71
73
|
items: List of ExternalId objects to retrieve.
|
|
74
|
+
ignore_unknown_ids: If True, ignores unknown IDs during retrieval.
|
|
72
75
|
Returns:
|
|
73
76
|
List of retrieved RobotDataPostProcessingResponse objects.
|
|
74
77
|
"""
|
|
78
|
+
if ignore_unknown_ids:
|
|
79
|
+
return self._request_item_split_retries(items, method="retrieve")
|
|
75
80
|
return self._request_item_response(items, method="retrieve")
|
|
76
81
|
|
|
77
82
|
def update(
|
|
@@ -88,13 +93,17 @@ class DataPostProcessingAPI(
|
|
|
88
93
|
"""
|
|
89
94
|
return self._update(items, mode=mode)
|
|
90
95
|
|
|
91
|
-
def delete(self, items: Sequence[ExternalId]) -> None:
|
|
96
|
+
def delete(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> None:
|
|
92
97
|
"""Delete data post-processing configurations from CDF.
|
|
93
98
|
|
|
94
99
|
Args:
|
|
95
100
|
items: List of ExternalId objects to delete.
|
|
101
|
+
ignore_unknown_ids: If True, ignores unknown IDs during deletion.
|
|
96
102
|
"""
|
|
97
|
-
|
|
103
|
+
if ignore_unknown_ids:
|
|
104
|
+
self._request_item_split_retries_no_response(items, "delete")
|
|
105
|
+
else:
|
|
106
|
+
self._request_no_response(items, "delete")
|
|
98
107
|
|
|
99
108
|
def paginate(
|
|
100
109
|
self,
|
|
@@ -48,14 +48,17 @@ class FramesAPI(CDFResourceAPI[ExternalId, RobotFrameRequest, RobotFrameResponse
|
|
|
48
48
|
"""
|
|
49
49
|
return self._request_item_response(items, "create")
|
|
50
50
|
|
|
51
|
-
def retrieve(self, items: Sequence[ExternalId]) -> list[RobotFrameResponse]:
|
|
51
|
+
def retrieve(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> list[RobotFrameResponse]:
|
|
52
52
|
"""Retrieve frames from CDF.
|
|
53
53
|
|
|
54
54
|
Args:
|
|
55
55
|
items: List of ExternalId objects to retrieve.
|
|
56
|
+
ignore_unknown_ids: If True, ignores unknown IDs during retrieval.
|
|
56
57
|
Returns:
|
|
57
58
|
List of retrieved RobotFrameResponse objects.
|
|
58
59
|
"""
|
|
60
|
+
if ignore_unknown_ids:
|
|
61
|
+
return self._request_item_split_retries(items, method="retrieve")
|
|
59
62
|
return self._request_item_response(items, method="retrieve")
|
|
60
63
|
|
|
61
64
|
def update(
|
|
@@ -72,13 +75,17 @@ class FramesAPI(CDFResourceAPI[ExternalId, RobotFrameRequest, RobotFrameResponse
|
|
|
72
75
|
"""
|
|
73
76
|
return self._update(items, mode=mode)
|
|
74
77
|
|
|
75
|
-
def delete(self, items: Sequence[ExternalId]) -> None:
|
|
78
|
+
def delete(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> None:
|
|
76
79
|
"""Delete frames from CDF.
|
|
77
80
|
|
|
78
81
|
Args:
|
|
79
82
|
items: List of ExternalId objects to delete.
|
|
83
|
+
ignore_unknown_ids: If True, ignores unknown IDs during deletion.
|
|
80
84
|
"""
|
|
81
|
-
|
|
85
|
+
if ignore_unknown_ids:
|
|
86
|
+
self._request_item_split_retries_no_response(items, "delete")
|
|
87
|
+
else:
|
|
88
|
+
self._request_no_response(items, "delete")
|
|
82
89
|
|
|
83
90
|
def paginate(
|
|
84
91
|
self,
|
|
@@ -53,14 +53,17 @@ class LocationsAPI(CDFResourceAPI[ExternalId, RobotLocationRequest, RobotLocatio
|
|
|
53
53
|
"""
|
|
54
54
|
return self._request_item_response(items, "create")
|
|
55
55
|
|
|
56
|
-
def retrieve(self, items: Sequence[ExternalId]) -> list[RobotLocationResponse]:
|
|
56
|
+
def retrieve(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> list[RobotLocationResponse]:
|
|
57
57
|
"""Retrieve locations from CDF.
|
|
58
58
|
|
|
59
59
|
Args:
|
|
60
60
|
items: List of ExternalId objects to retrieve.
|
|
61
|
+
ignore_unknown_ids: If True, ignores unknown IDs during retrieval.
|
|
61
62
|
Returns:
|
|
62
63
|
List of retrieved RobotLocationResponse objects.
|
|
63
64
|
"""
|
|
65
|
+
if ignore_unknown_ids:
|
|
66
|
+
return self._request_item_split_retries(items, method="retrieve")
|
|
64
67
|
return self._request_item_response(items, method="retrieve")
|
|
65
68
|
|
|
66
69
|
def update(
|
|
@@ -77,13 +80,17 @@ class LocationsAPI(CDFResourceAPI[ExternalId, RobotLocationRequest, RobotLocatio
|
|
|
77
80
|
"""
|
|
78
81
|
return self._update(items, mode=mode)
|
|
79
82
|
|
|
80
|
-
def delete(self, items: Sequence[ExternalId]) -> None:
|
|
83
|
+
def delete(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> None:
|
|
81
84
|
"""Delete locations from CDF.
|
|
82
85
|
|
|
83
86
|
Args:
|
|
84
87
|
items: List of ExternalId objects to delete.
|
|
88
|
+
ignore_unknown_ids: If True, ignores unknown IDs during deletion.
|
|
85
89
|
"""
|
|
86
|
-
|
|
90
|
+
if ignore_unknown_ids:
|
|
91
|
+
self._request_item_split_retries_no_response(items, "delete")
|
|
92
|
+
else:
|
|
93
|
+
self._request_no_response(items, "delete")
|
|
87
94
|
|
|
88
95
|
def paginate(
|
|
89
96
|
self,
|
|
@@ -48,14 +48,17 @@ class MapsAPI(CDFResourceAPI[ExternalId, RobotMapRequest, RobotMapResponse]):
|
|
|
48
48
|
"""
|
|
49
49
|
return self._request_item_response(items, "create")
|
|
50
50
|
|
|
51
|
-
def retrieve(self, items: Sequence[ExternalId]) -> list[RobotMapResponse]:
|
|
51
|
+
def retrieve(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> list[RobotMapResponse]:
|
|
52
52
|
"""Retrieve maps from CDF.
|
|
53
53
|
|
|
54
54
|
Args:
|
|
55
55
|
items: List of ExternalId objects to retrieve.
|
|
56
|
+
ignore_unknown_ids: If True, ignores unknown IDs during retrieval.
|
|
56
57
|
Returns:
|
|
57
58
|
List of retrieved RobotMapResponse objects.
|
|
58
59
|
"""
|
|
60
|
+
if ignore_unknown_ids:
|
|
61
|
+
return self._request_item_split_retries(items, method="retrieve")
|
|
59
62
|
return self._request_item_response(items, method="retrieve")
|
|
60
63
|
|
|
61
64
|
def update(
|
|
@@ -72,13 +75,17 @@ class MapsAPI(CDFResourceAPI[ExternalId, RobotMapRequest, RobotMapResponse]):
|
|
|
72
75
|
"""
|
|
73
76
|
return self._update(items, mode=mode)
|
|
74
77
|
|
|
75
|
-
def delete(self, items: Sequence[ExternalId]) -> None:
|
|
78
|
+
def delete(self, items: Sequence[ExternalId], ignore_unknown_ids: bool = False) -> None:
|
|
76
79
|
"""Delete maps from CDF.
|
|
77
80
|
|
|
78
81
|
Args:
|
|
79
82
|
items: List of ExternalId objects to delete.
|
|
83
|
+
ignore_unknown_ids: If True, ignores unknown IDs during deletion.
|
|
80
84
|
"""
|
|
81
|
-
|
|
85
|
+
if ignore_unknown_ids:
|
|
86
|
+
self._request_item_split_retries_no_response(items, "delete")
|
|
87
|
+
else:
|
|
88
|
+
self._request_no_response(items, "delete")
|
|
82
89
|
|
|
83
90
|
def paginate(
|
|
84
91
|
self,
|
|
@@ -46,14 +46,17 @@ class RobotsAPI(CDFResourceAPI[DataSetId, RobotRequest, RobotResponse]):
|
|
|
46
46
|
"""
|
|
47
47
|
return self._request_item_response(items, "create")
|
|
48
48
|
|
|
49
|
-
def retrieve(self, items: Sequence[DataSetId]) -> list[RobotResponse]:
|
|
49
|
+
def retrieve(self, items: Sequence[DataSetId], ignore_unknown_ids: bool = False) -> list[RobotResponse]:
|
|
50
50
|
"""Retrieve robots from CDF.
|
|
51
51
|
|
|
52
52
|
Args:
|
|
53
53
|
items: List of DataSetId objects to retrieve.
|
|
54
|
+
ignore_unknown_ids: If True, ignores unknown IDs during retrieval.
|
|
54
55
|
Returns:
|
|
55
56
|
List of retrieved RobotResponse objects.
|
|
56
57
|
"""
|
|
58
|
+
if ignore_unknown_ids:
|
|
59
|
+
return self._request_item_split_retries(items, method="retrieve")
|
|
57
60
|
return self._request_item_response(items, method="retrieve")
|
|
58
61
|
|
|
59
62
|
def update(
|
|
@@ -70,13 +73,17 @@ class RobotsAPI(CDFResourceAPI[DataSetId, RobotRequest, RobotResponse]):
|
|
|
70
73
|
"""
|
|
71
74
|
return self._update(items, mode=mode)
|
|
72
75
|
|
|
73
|
-
def delete(self, items: Sequence[DataSetId]) -> None:
|
|
76
|
+
def delete(self, items: Sequence[DataSetId], ignore_unknown_ids: bool = False) -> None:
|
|
74
77
|
"""Delete robots from CDF.
|
|
75
78
|
|
|
76
79
|
Args:
|
|
77
80
|
items: List of DataSetId objects to delete.
|
|
81
|
+
ignore_unknown_ids: If True, ignores unknown IDs during deletion.
|
|
78
82
|
"""
|
|
79
|
-
|
|
83
|
+
if ignore_unknown_ids:
|
|
84
|
+
self._request_item_split_retries_no_response(items, "delete")
|
|
85
|
+
else:
|
|
86
|
+
self._request_no_response(items, "delete")
|
|
80
87
|
|
|
81
88
|
def paginate(
|
|
82
89
|
self,
|
|
@@ -65,7 +65,7 @@ class HTTPClient:
|
|
|
65
65
|
pool_connections: int = 10,
|
|
66
66
|
pool_maxsize: int = 20,
|
|
67
67
|
retry_status_codes: Set[int] = frozenset({408, 429, 502, 503, 504}),
|
|
68
|
-
split_items_status_codes: Set[int] = frozenset({400, 408, 409, 422, 502, 503, 504}),
|
|
68
|
+
split_items_status_codes: Set[int] = frozenset({400, 404, 408, 409, 422, 502, 503, 504}),
|
|
69
69
|
console: Console | None = None,
|
|
70
70
|
):
|
|
71
71
|
self.config = config
|
|
@@ -23,15 +23,14 @@ from cognite_toolkit._cdf_tk.client.api.legacy.extended_functions import Extende
|
|
|
23
23
|
from cognite_toolkit._cdf_tk.client.api.legacy.extended_raw import ExtendedRawAPI
|
|
24
24
|
from cognite_toolkit._cdf_tk.client.api.legacy.extended_timeseries import ExtendedTimeSeriesAPI
|
|
25
25
|
from cognite_toolkit._cdf_tk.client.api.legacy.location_filters import LocationFiltersAPI
|
|
26
|
-
from cognite_toolkit._cdf_tk.client.api.legacy.robotics import (
|
|
27
|
-
CapabilitiesAPI,
|
|
28
|
-
DataPostProcessingAPI,
|
|
29
|
-
FramesAPI,
|
|
30
|
-
MapsAPI,
|
|
31
|
-
RoboticsAPI,
|
|
32
|
-
)
|
|
33
|
-
from cognite_toolkit._cdf_tk.client.api.legacy.robotics import LocationsAPI as RoboticsLocationsAPI
|
|
34
26
|
from cognite_toolkit._cdf_tk.client.api.legacy.search_config import SearchConfigurationsAPI
|
|
27
|
+
from cognite_toolkit._cdf_tk.client.api.robotics import RoboticsAPI
|
|
28
|
+
from cognite_toolkit._cdf_tk.client.api.robotics_capabilities import CapabilitiesAPI
|
|
29
|
+
from cognite_toolkit._cdf_tk.client.api.robotics_data_postprocessing import DataPostProcessingAPI
|
|
30
|
+
from cognite_toolkit._cdf_tk.client.api.robotics_frames import FramesAPI
|
|
31
|
+
from cognite_toolkit._cdf_tk.client.api.robotics_locations import LocationsAPI
|
|
32
|
+
from cognite_toolkit._cdf_tk.client.api.robotics_maps import MapsAPI
|
|
33
|
+
from cognite_toolkit._cdf_tk.client.api.robotics_robots import RobotsAPI
|
|
35
34
|
|
|
36
35
|
from ._toolkit_client import ToolAPI
|
|
37
36
|
from .api.assets import AssetsAPI
|
|
@@ -139,14 +138,6 @@ class ToolkitClientMock(CogniteClientMock):
|
|
|
139
138
|
self.raw.rows = MagicMock(spec_set=RawRowsAPI)
|
|
140
139
|
self.raw.tables = MagicMock(spec_set=RawTablesAPI)
|
|
141
140
|
|
|
142
|
-
self.robotics = MagicMock()
|
|
143
|
-
self.robotics.robots = MagicMock(spec=RoboticsAPI)
|
|
144
|
-
self.robotics.data_postprocessing = MagicMock(spec_set=DataPostProcessingAPI)
|
|
145
|
-
self.robotics.locations = MagicMock(spec_set=RoboticsLocationsAPI)
|
|
146
|
-
self.robotics.frames = MagicMock(spec_set=FramesAPI)
|
|
147
|
-
self.robotics.maps = MagicMock(spec_set=MapsAPI)
|
|
148
|
-
self.robotics.capabilities = MagicMock(spec_set=CapabilitiesAPI)
|
|
149
|
-
|
|
150
141
|
self.data_modeling.instances = MagicMock(spec_set=ExtendedInstancesAPI)
|
|
151
142
|
|
|
152
143
|
self.time_series = MagicMock(spec=ExtendedTimeSeriesAPI)
|
|
@@ -171,6 +162,13 @@ class ToolkitClientMock(CogniteClientMock):
|
|
|
171
162
|
self.tool.hosted_extractors.destinations = MagicMock(spec_set=HostedExtractorDestinationsAPI)
|
|
172
163
|
self.tool.hosted_extractors.mappings = MagicMock(spec_set=HostedExtractorMappingsAPI)
|
|
173
164
|
self.tool.labels = MagicMock(spec_set=LabelsAPI)
|
|
165
|
+
self.tool.robotics = MagicMock(spec=RoboticsAPI)
|
|
166
|
+
self.tool.robotics.capabilities = MagicMock(spec_set=CapabilitiesAPI)
|
|
167
|
+
self.tool.robotics.data_postprocessing = MagicMock(spec_set=DataPostProcessingAPI)
|
|
168
|
+
self.tool.robotics.frames = MagicMock(spec_set=FramesAPI)
|
|
169
|
+
self.tool.robotics.locations = MagicMock(spec_set=LocationsAPI)
|
|
170
|
+
self.tool.robotics.maps = MagicMock(spec_set=MapsAPI)
|
|
171
|
+
self.tool.robotics.robots = MagicMock(spec_set=RobotsAPI)
|
|
174
172
|
self.tool.security_categories = MagicMock(spec_set=SecurityCategoriesAPI)
|
|
175
173
|
self.tool.sequences = MagicMock(spec_set=SequencesAPI)
|
|
176
174
|
self.tool.transformations = MagicMock(spec_set=TransformationsAPI)
|