digitalhub 0.11.0b7__py3-none-any.whl → 0.13.0__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.

Potentially problematic release.


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

Files changed (272) hide show
  1. digitalhub/__init__.py +4 -1
  2. digitalhub/context/api.py +9 -5
  3. digitalhub/context/builder.py +7 -5
  4. digitalhub/context/context.py +13 -1
  5. digitalhub/entities/__init__.py +3 -0
  6. digitalhub/entities/_base/__init__.py +3 -0
  7. digitalhub/entities/_base/_base/__init__.py +3 -0
  8. digitalhub/entities/_base/_base/entity.py +4 -0
  9. digitalhub/entities/_base/context/__init__.py +3 -0
  10. digitalhub/entities/_base/context/entity.py +4 -0
  11. digitalhub/entities/_base/entity/__init__.py +3 -0
  12. digitalhub/entities/_base/entity/_constructors/__init__.py +3 -0
  13. digitalhub/entities/_base/entity/_constructors/metadata.py +4 -0
  14. digitalhub/entities/_base/entity/_constructors/name.py +4 -0
  15. digitalhub/entities/_base/entity/_constructors/spec.py +4 -0
  16. digitalhub/entities/_base/entity/_constructors/status.py +4 -0
  17. digitalhub/entities/_base/entity/_constructors/uuid.py +4 -0
  18. digitalhub/entities/_base/entity/builder.py +4 -0
  19. digitalhub/entities/_base/entity/entity.py +4 -0
  20. digitalhub/entities/_base/entity/metadata.py +4 -0
  21. digitalhub/entities/_base/entity/spec.py +4 -0
  22. digitalhub/entities/_base/entity/status.py +4 -0
  23. digitalhub/entities/_base/executable/__init__.py +3 -0
  24. digitalhub/entities/_base/executable/entity.py +109 -57
  25. digitalhub/entities/_base/material/__init__.py +3 -0
  26. digitalhub/entities/_base/material/entity.py +15 -18
  27. digitalhub/entities/_base/material/spec.py +4 -0
  28. digitalhub/entities/_base/material/status.py +4 -0
  29. digitalhub/entities/_base/material/utils.py +5 -1
  30. digitalhub/entities/_base/runtime_entity/__init__.py +3 -0
  31. digitalhub/entities/_base/runtime_entity/builder.py +4 -0
  32. digitalhub/entities/_base/unversioned/__init__.py +3 -0
  33. digitalhub/entities/_base/unversioned/builder.py +4 -0
  34. digitalhub/entities/_base/unversioned/entity.py +4 -0
  35. digitalhub/entities/_base/versioned/__init__.py +3 -0
  36. digitalhub/entities/_base/versioned/builder.py +4 -0
  37. digitalhub/entities/_base/versioned/entity.py +4 -0
  38. digitalhub/entities/_commons/__init__.py +3 -0
  39. digitalhub/entities/_commons/enums.py +4 -0
  40. digitalhub/entities/_commons/metrics.py +68 -30
  41. digitalhub/entities/_commons/utils.py +40 -9
  42. digitalhub/entities/_processors/__init__.py +3 -0
  43. digitalhub/entities/_processors/base.py +154 -79
  44. digitalhub/entities/_processors/context.py +370 -215
  45. digitalhub/entities/_processors/utils.py +78 -30
  46. digitalhub/entities/artifact/__init__.py +3 -0
  47. digitalhub/entities/artifact/_base/__init__.py +3 -0
  48. digitalhub/entities/artifact/_base/builder.py +4 -0
  49. digitalhub/entities/artifact/_base/entity.py +4 -0
  50. digitalhub/entities/artifact/_base/spec.py +4 -0
  51. digitalhub/entities/artifact/_base/status.py +4 -0
  52. digitalhub/entities/artifact/artifact/__init__.py +3 -0
  53. digitalhub/entities/artifact/artifact/builder.py +4 -0
  54. digitalhub/entities/artifact/artifact/entity.py +4 -0
  55. digitalhub/entities/artifact/artifact/spec.py +4 -0
  56. digitalhub/entities/artifact/artifact/status.py +4 -0
  57. digitalhub/entities/artifact/crud.py +8 -0
  58. digitalhub/entities/artifact/utils.py +32 -13
  59. digitalhub/entities/builders.py +4 -0
  60. digitalhub/entities/dataitem/__init__.py +3 -0
  61. digitalhub/entities/dataitem/_base/__init__.py +3 -0
  62. digitalhub/entities/dataitem/_base/builder.py +4 -0
  63. digitalhub/entities/dataitem/_base/entity.py +4 -0
  64. digitalhub/entities/dataitem/_base/spec.py +4 -0
  65. digitalhub/entities/dataitem/_base/status.py +4 -0
  66. digitalhub/entities/dataitem/crud.py +18 -2
  67. digitalhub/entities/dataitem/dataitem/__init__.py +3 -0
  68. digitalhub/entities/dataitem/dataitem/builder.py +4 -0
  69. digitalhub/entities/dataitem/dataitem/entity.py +4 -0
  70. digitalhub/entities/dataitem/dataitem/spec.py +4 -0
  71. digitalhub/entities/dataitem/dataitem/status.py +4 -0
  72. digitalhub/entities/dataitem/iceberg/__init__.py +3 -0
  73. digitalhub/entities/dataitem/iceberg/builder.py +4 -0
  74. digitalhub/entities/dataitem/iceberg/entity.py +4 -0
  75. digitalhub/entities/dataitem/iceberg/spec.py +4 -0
  76. digitalhub/entities/dataitem/iceberg/status.py +4 -0
  77. digitalhub/entities/dataitem/table/__init__.py +3 -0
  78. digitalhub/entities/dataitem/table/builder.py +4 -0
  79. digitalhub/entities/dataitem/table/entity.py +7 -3
  80. digitalhub/entities/dataitem/table/models.py +4 -0
  81. digitalhub/entities/dataitem/table/spec.py +4 -0
  82. digitalhub/entities/dataitem/table/status.py +4 -0
  83. digitalhub/entities/dataitem/table/utils.py +4 -0
  84. digitalhub/entities/dataitem/utils.py +88 -35
  85. digitalhub/entities/function/__init__.py +3 -0
  86. digitalhub/entities/function/_base/__init__.py +3 -0
  87. digitalhub/entities/function/_base/builder.py +4 -0
  88. digitalhub/entities/function/_base/entity.py +4 -0
  89. digitalhub/entities/function/_base/spec.py +4 -0
  90. digitalhub/entities/function/_base/status.py +4 -0
  91. digitalhub/entities/function/crud.py +4 -0
  92. digitalhub/entities/model/__init__.py +3 -0
  93. digitalhub/entities/model/_base/__init__.py +3 -0
  94. digitalhub/entities/model/_base/builder.py +4 -0
  95. digitalhub/entities/model/_base/entity.py +4 -0
  96. digitalhub/entities/model/_base/spec.py +4 -0
  97. digitalhub/entities/model/_base/status.py +4 -0
  98. digitalhub/entities/model/crud.py +8 -0
  99. digitalhub/entities/model/huggingface/__init__.py +3 -0
  100. digitalhub/entities/model/huggingface/builder.py +4 -0
  101. digitalhub/entities/model/huggingface/entity.py +4 -0
  102. digitalhub/entities/model/huggingface/spec.py +4 -0
  103. digitalhub/entities/model/huggingface/status.py +4 -0
  104. digitalhub/entities/model/mlflow/__init__.py +3 -0
  105. digitalhub/entities/model/mlflow/builder.py +4 -0
  106. digitalhub/entities/model/mlflow/entity.py +4 -0
  107. digitalhub/entities/model/mlflow/models.py +4 -0
  108. digitalhub/entities/model/mlflow/spec.py +4 -0
  109. digitalhub/entities/model/mlflow/status.py +4 -0
  110. digitalhub/entities/model/mlflow/utils.py +4 -0
  111. digitalhub/entities/model/model/__init__.py +3 -0
  112. digitalhub/entities/model/model/builder.py +4 -0
  113. digitalhub/entities/model/model/entity.py +4 -0
  114. digitalhub/entities/model/model/spec.py +4 -0
  115. digitalhub/entities/model/model/status.py +4 -0
  116. digitalhub/entities/model/sklearn/__init__.py +3 -0
  117. digitalhub/entities/model/sklearn/builder.py +4 -0
  118. digitalhub/entities/model/sklearn/entity.py +4 -0
  119. digitalhub/entities/model/sklearn/spec.py +4 -0
  120. digitalhub/entities/model/sklearn/status.py +4 -0
  121. digitalhub/entities/model/utils.py +32 -13
  122. digitalhub/entities/project/__init__.py +3 -0
  123. digitalhub/entities/project/_base/__init__.py +3 -0
  124. digitalhub/entities/project/_base/builder.py +4 -0
  125. digitalhub/entities/project/_base/entity.py +4 -2
  126. digitalhub/entities/project/_base/models.py +4 -0
  127. digitalhub/entities/project/_base/spec.py +4 -0
  128. digitalhub/entities/project/_base/status.py +4 -0
  129. digitalhub/entities/project/crud.py +4 -0
  130. digitalhub/entities/project/utils.py +4 -0
  131. digitalhub/entities/run/__init__.py +3 -0
  132. digitalhub/entities/run/_base/__init__.py +3 -0
  133. digitalhub/entities/run/_base/builder.py +4 -0
  134. digitalhub/entities/run/_base/entity.py +6 -2
  135. digitalhub/entities/run/_base/spec.py +4 -0
  136. digitalhub/entities/run/_base/status.py +4 -0
  137. digitalhub/entities/run/crud.py +4 -0
  138. digitalhub/entities/secret/__init__.py +3 -0
  139. digitalhub/entities/secret/_base/__init__.py +3 -0
  140. digitalhub/entities/secret/_base/builder.py +4 -0
  141. digitalhub/entities/secret/_base/entity.py +4 -0
  142. digitalhub/entities/secret/_base/spec.py +4 -0
  143. digitalhub/entities/secret/_base/status.py +4 -0
  144. digitalhub/entities/secret/crud.py +4 -0
  145. digitalhub/entities/task/__init__.py +3 -0
  146. digitalhub/entities/task/_base/__init__.py +3 -0
  147. digitalhub/entities/task/_base/builder.py +4 -0
  148. digitalhub/entities/task/_base/entity.py +4 -0
  149. digitalhub/entities/task/_base/models.py +16 -3
  150. digitalhub/entities/task/_base/spec.py +4 -0
  151. digitalhub/entities/task/_base/status.py +4 -0
  152. digitalhub/entities/task/_base/utils.py +4 -0
  153. digitalhub/entities/task/crud.py +4 -0
  154. digitalhub/entities/trigger/__init__.py +3 -0
  155. digitalhub/entities/trigger/_base/__init__.py +3 -0
  156. digitalhub/entities/trigger/_base/builder.py +4 -0
  157. digitalhub/entities/trigger/_base/entity.py +15 -0
  158. digitalhub/entities/trigger/_base/spec.py +4 -0
  159. digitalhub/entities/trigger/_base/status.py +4 -0
  160. digitalhub/entities/trigger/crud.py +4 -0
  161. digitalhub/entities/trigger/lifecycle/__init__.py +3 -0
  162. digitalhub/entities/trigger/lifecycle/builder.py +4 -0
  163. digitalhub/entities/trigger/lifecycle/entity.py +4 -0
  164. digitalhub/entities/trigger/lifecycle/spec.py +4 -0
  165. digitalhub/entities/trigger/lifecycle/status.py +4 -0
  166. digitalhub/entities/trigger/scheduler/__init__.py +3 -0
  167. digitalhub/entities/trigger/scheduler/builder.py +4 -0
  168. digitalhub/entities/trigger/scheduler/entity.py +4 -0
  169. digitalhub/entities/trigger/scheduler/spec.py +4 -0
  170. digitalhub/entities/trigger/scheduler/status.py +4 -0
  171. digitalhub/entities/workflow/__init__.py +3 -0
  172. digitalhub/entities/workflow/_base/__init__.py +3 -0
  173. digitalhub/entities/workflow/_base/builder.py +4 -0
  174. digitalhub/entities/workflow/_base/entity.py +4 -0
  175. digitalhub/entities/workflow/_base/spec.py +4 -0
  176. digitalhub/entities/workflow/_base/status.py +4 -0
  177. digitalhub/entities/workflow/crud.py +4 -0
  178. digitalhub/factory/__init__.py +3 -0
  179. digitalhub/factory/factory.py +29 -3
  180. digitalhub/factory/utils.py +15 -3
  181. digitalhub/runtimes/__init__.py +3 -0
  182. digitalhub/runtimes/_base.py +5 -1
  183. digitalhub/runtimes/builder.py +22 -1
  184. digitalhub/runtimes/enums.py +4 -0
  185. digitalhub/stores/__init__.py +3 -0
  186. digitalhub/stores/client/__init__.py +15 -0
  187. digitalhub/stores/client/_base/__init__.py +3 -0
  188. digitalhub/stores/client/_base/api_builder.py +18 -0
  189. digitalhub/stores/client/_base/client.py +97 -0
  190. digitalhub/stores/client/_base/key_builder.py +32 -0
  191. digitalhub/stores/client/_base/params_builder.py +18 -0
  192. digitalhub/stores/client/api.py +14 -5
  193. digitalhub/stores/client/builder.py +7 -1
  194. digitalhub/stores/client/dhcore/__init__.py +3 -0
  195. digitalhub/stores/client/dhcore/api_builder.py +21 -0
  196. digitalhub/stores/client/dhcore/client.py +329 -70
  197. digitalhub/stores/client/dhcore/configurator.py +489 -193
  198. digitalhub/stores/client/dhcore/enums.py +7 -0
  199. digitalhub/stores/client/dhcore/error_parser.py +39 -1
  200. digitalhub/stores/client/dhcore/key_builder.py +4 -0
  201. digitalhub/stores/client/dhcore/models.py +4 -0
  202. digitalhub/stores/client/dhcore/params_builder.py +117 -17
  203. digitalhub/stores/client/dhcore/utils.py +44 -22
  204. digitalhub/stores/client/local/__init__.py +3 -0
  205. digitalhub/stores/client/local/api_builder.py +21 -0
  206. digitalhub/stores/client/local/client.py +10 -8
  207. digitalhub/stores/client/local/enums.py +4 -0
  208. digitalhub/stores/client/local/key_builder.py +4 -0
  209. digitalhub/stores/client/local/params_builder.py +4 -0
  210. digitalhub/stores/credentials/__init__.py +3 -0
  211. digitalhub/stores/credentials/api.py +35 -0
  212. digitalhub/stores/credentials/configurator.py +210 -0
  213. digitalhub/stores/credentials/enums.py +68 -0
  214. digitalhub/stores/credentials/handler.py +176 -0
  215. digitalhub/stores/credentials/ini_module.py +164 -0
  216. digitalhub/stores/credentials/store.py +81 -0
  217. digitalhub/stores/data/__init__.py +3 -0
  218. digitalhub/stores/data/_base/__init__.py +3 -0
  219. digitalhub/stores/data/_base/store.py +31 -9
  220. digitalhub/stores/data/api.py +53 -9
  221. digitalhub/stores/data/builder.py +94 -41
  222. digitalhub/stores/data/enums.py +4 -0
  223. digitalhub/stores/data/local/__init__.py +3 -0
  224. digitalhub/stores/data/local/store.py +8 -7
  225. digitalhub/stores/data/remote/__init__.py +3 -0
  226. digitalhub/stores/data/remote/store.py +8 -7
  227. digitalhub/stores/data/s3/__init__.py +3 -0
  228. digitalhub/stores/data/s3/configurator.py +69 -80
  229. digitalhub/stores/data/s3/store.py +73 -81
  230. digitalhub/stores/data/s3/utils.py +14 -10
  231. digitalhub/stores/data/sql/__init__.py +3 -0
  232. digitalhub/stores/data/sql/configurator.py +80 -73
  233. digitalhub/stores/data/sql/store.py +195 -102
  234. digitalhub/stores/readers/__init__.py +3 -0
  235. digitalhub/stores/readers/data/__init__.py +3 -0
  236. digitalhub/stores/readers/data/_base/__init__.py +3 -0
  237. digitalhub/stores/readers/data/_base/builder.py +4 -0
  238. digitalhub/stores/readers/data/_base/reader.py +4 -0
  239. digitalhub/stores/readers/data/api.py +4 -0
  240. digitalhub/stores/readers/data/factory.py +4 -0
  241. digitalhub/stores/readers/data/pandas/__init__.py +3 -0
  242. digitalhub/stores/readers/data/pandas/builder.py +4 -0
  243. digitalhub/stores/readers/data/pandas/reader.py +4 -0
  244. digitalhub/stores/readers/query/__init__.py +3 -0
  245. digitalhub/utils/__init__.py +3 -0
  246. digitalhub/utils/enums.py +4 -0
  247. digitalhub/utils/exceptions.py +10 -0
  248. digitalhub/utils/file_utils.py +57 -30
  249. digitalhub/utils/generic_utils.py +45 -33
  250. digitalhub/utils/git_utils.py +28 -14
  251. digitalhub/utils/io_utils.py +23 -18
  252. digitalhub/utils/logger.py +4 -0
  253. digitalhub/utils/types.py +4 -0
  254. digitalhub/utils/uri_utils.py +35 -31
  255. digitalhub-0.13.0.dist-info/METADATA +301 -0
  256. digitalhub-0.13.0.dist-info/RECORD +259 -0
  257. digitalhub-0.13.0.dist-info/licenses/AUTHORS +5 -0
  258. digitalhub-0.13.0.dist-info/licenses/LICENSE +201 -0
  259. digitalhub/entities/_commons/types.py +0 -5
  260. digitalhub/stores/configurator/__init__.py +0 -0
  261. digitalhub/stores/configurator/api.py +0 -31
  262. digitalhub/stores/configurator/configurator.py +0 -198
  263. digitalhub/stores/configurator/credentials_store.py +0 -65
  264. digitalhub/stores/configurator/enums.py +0 -21
  265. digitalhub/stores/configurator/ini_module.py +0 -128
  266. digitalhub/stores/data/s3/enums.py +0 -16
  267. digitalhub/stores/data/sql/enums.py +0 -16
  268. digitalhub/stores/data/utils.py +0 -34
  269. digitalhub-0.11.0b7.dist-info/METADATA +0 -259
  270. digitalhub-0.11.0b7.dist-info/RECORD +0 -261
  271. digitalhub-0.11.0b7.dist-info/licenses/LICENSE.txt +0 -216
  272. {digitalhub-0.11.0b7.dist-info → digitalhub-0.13.0.dist-info}/WHEEL +0 -0
@@ -1,3 +1,7 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
1
5
  from __future__ import annotations
2
6
 
3
7
  import typing
@@ -24,11 +28,13 @@ if typing.TYPE_CHECKING:
24
28
 
25
29
  class ContextEntityOperationsProcessor:
26
30
  """
27
- Processor for Entity operations.
31
+ Processor for context entity operations.
28
32
 
29
- This object interacts with the context, check the category of the object,
30
- and then calls the appropriate method to perform the requested operation.
31
- Operations can be CRUD, search, list, etc.
33
+ This class handles CRUD operations and other entity management tasks
34
+ for context-level entities (artifacts, functions, workflows, runs, etc.)
35
+ within projects. It manages the full lifecycle of versioned and
36
+ unversioned entities including creation, reading, updating, deletion,
37
+ import/export, and specialized operations like file uploads and metrics.
32
38
  """
33
39
 
34
40
  ##############################
@@ -42,23 +48,24 @@ class ContextEntityOperationsProcessor:
42
48
  entity_dict: dict,
43
49
  ) -> dict:
44
50
  """
45
- Create object in backend.
51
+ Create a context entity in the backend.
52
+
53
+ Builds the appropriate API endpoint and sends a create request
54
+ to the backend for context-level entities within a project.
46
55
 
47
56
  Parameters
48
57
  ----------
49
58
  context : Context
50
- Context instance.
51
- project : str
52
- Project name.
59
+ The project context instance.
53
60
  entity_type : str
54
- Entity type.
61
+ The type of entity to create (e.g., 'artifact', 'function').
55
62
  entity_dict : dict
56
- Object instance.
63
+ The entity data dictionary to create.
57
64
 
58
65
  Returns
59
66
  -------
60
67
  dict
61
- Object instance.
68
+ The created entity data returned from the backend.
62
69
  """
63
70
  api = context.client.build_api(
64
71
  ApiCategories.CONTEXT.value,
@@ -74,17 +81,25 @@ class ContextEntityOperationsProcessor:
74
81
  **kwargs,
75
82
  ) -> ContextEntity:
76
83
  """
77
- Create object in backend.
84
+ Create a context entity in the backend.
85
+
86
+ Creates a new context entity either from an existing entity object
87
+ or by building one from the provided parameters. Handles entity
88
+ creation within a project context.
78
89
 
79
90
  Parameters
80
91
  ----------
92
+ _entity : ContextEntity, optional
93
+ An existing context entity object to create. If None,
94
+ a new entity will be built from kwargs.
81
95
  **kwargs : dict
82
- Parameters to pass to entity builder.
96
+ Parameters for entity creation, including 'project' and
97
+ entity-specific parameters.
83
98
 
84
99
  Returns
85
100
  -------
86
101
  ContextEntity
87
- Object instance.
102
+ The created context entity with backend data populated.
88
103
  """
89
104
  if _entity is not None:
90
105
  context = _entity._context()
@@ -100,17 +115,29 @@ class ContextEntityOperationsProcessor:
100
115
  **kwargs,
101
116
  ) -> MaterialEntity:
102
117
  """
103
- Create object in backend and upload file.
118
+ Create a material entity in the backend and upload associated files.
119
+
120
+ Creates a new material entity (artifact, dataitem, or model) and
121
+ handles file upload operations. Manages upload state transitions
122
+ and error handling during the upload process.
104
123
 
105
124
  Parameters
106
125
  ----------
107
126
  **kwargs : dict
108
- Parameters to pass to entity builder.
127
+ Parameters for entity creation including:
128
+ - 'source': file source(s) to upload
129
+ - 'project': project name
130
+ - other entity-specific parameters
109
131
 
110
132
  Returns
111
133
  -------
112
134
  MaterialEntity
113
- Object instance.
135
+ The created material entity with uploaded files.
136
+
137
+ Raises
138
+ ------
139
+ EntityError
140
+ If file upload fails during the process.
114
141
  """
115
142
  source: SourcesOrListOfSources = kwargs.pop("source")
116
143
  context = get_context_from_project(kwargs["project"])
@@ -131,7 +158,7 @@ class ContextEntityOperationsProcessor:
131
158
  msg = None
132
159
  except Exception as e:
133
160
  uploaded = False
134
- msg = str(e)
161
+ msg = str(e.args)
135
162
 
136
163
  new_obj.status.message = msg
137
164
 
@@ -156,27 +183,31 @@ class ContextEntityOperationsProcessor:
156
183
  **kwargs,
157
184
  ) -> dict:
158
185
  """
159
- Read object from backend.
186
+ Read a context entity from the backend.
187
+
188
+ Retrieves entity data from the backend using either entity ID
189
+ for direct access or entity name for latest version lookup.
190
+ Handles both specific version reads and latest version queries.
160
191
 
161
192
  Parameters
162
193
  ----------
163
194
  context : Context
164
- Context instance.
195
+ The project context instance.
165
196
  identifier : str
166
- Entity key (store://...) or entity name.
167
- entity_type : str
168
- Entity type.
169
- project : str
170
- Project name.
171
- entity_id : str
172
- Entity ID.
197
+ Entity key (store://...) or entity name identifier.
198
+ entity_type : str, optional
199
+ The type of entity to read.
200
+ project : str, optional
201
+ Project name (used for identifier parsing).
202
+ entity_id : str, optional
203
+ Specific entity ID to read.
173
204
  **kwargs : dict
174
- Parameters to pass to the API call.
205
+ Additional parameters to pass to the API call.
175
206
 
176
207
  Returns
177
208
  -------
178
209
  dict
179
- Object instance.
210
+ The entity data retrieved from the backend.
180
211
  """
181
212
  project, entity_type, _, entity_name, entity_id = parse_identifier(
182
213
  identifier,
@@ -220,25 +251,28 @@ class ContextEntityOperationsProcessor:
220
251
  **kwargs,
221
252
  ) -> ContextEntity:
222
253
  """
223
- Read object from backend.
254
+ Read a context entity from the backend.
255
+
256
+ Retrieves entity data from the backend and constructs a context
257
+ entity object. Handles post-processing for metrics and file info.
224
258
 
225
259
  Parameters
226
260
  ----------
227
261
  identifier : str
228
- Entity key (store://...) or entity name.
229
- entity_type : str
230
- Entity type.
231
- project : str
232
- Project name.
233
- entity_id : str
234
- Entity ID.
262
+ Entity key (store://...) or entity name identifier.
263
+ entity_type : str, optional
264
+ The type of entity to read.
265
+ project : str, optional
266
+ Project name for context resolution.
267
+ entity_id : str, optional
268
+ Specific entity ID to read.
235
269
  **kwargs : dict
236
- Parameters to pass to the API call.
270
+ Additional parameters to pass to the API call.
237
271
 
238
272
  Returns
239
273
  -------
240
- VersionedEntity
241
- Object instance.
274
+ ContextEntity
275
+ The context entity object populated with backend data.
242
276
  """
243
277
  context = get_context_from_identifier(identifier, project)
244
278
  obj = self._read_context_entity(
@@ -261,25 +295,29 @@ class ContextEntityOperationsProcessor:
261
295
  **kwargs,
262
296
  ) -> UnversionedEntity:
263
297
  """
264
- Read object from backend.
298
+ Read an unversioned entity from the backend.
299
+
300
+ Retrieves unversioned entity data (runs, tasks) from the backend.
301
+ Handles identifier parsing for entities that don't follow the
302
+ standard versioned naming convention.
265
303
 
266
304
  Parameters
267
305
  ----------
268
306
  identifier : str
269
- Entity key (store://...) or entity name.
270
- entity_type : str
271
- Entity type.
272
- project : str
273
- Project name.
274
- entity_id : str
275
- Entity ID.
307
+ Entity key (store://...) or entity ID.
308
+ entity_type : str, optional
309
+ The type of entity to read.
310
+ project : str, optional
311
+ Project name for context resolution.
312
+ entity_id : str, optional
313
+ Specific entity ID to read.
276
314
  **kwargs : dict
277
- Parameters to pass to the API call.
315
+ Additional parameters to pass to the API call.
278
316
 
279
317
  Returns
280
318
  -------
281
319
  UnversionedEntity
282
- Object instance.
320
+ The unversioned entity object populated with backend data.
283
321
  """
284
322
  if not identifier.startswith("store://"):
285
323
  entity_id = identifier
@@ -300,17 +338,26 @@ class ContextEntityOperationsProcessor:
300
338
  file: str,
301
339
  ) -> ContextEntity:
302
340
  """
303
- Import object from a YAML file and create a new object into the backend.
341
+ Import a context entity from a YAML file and create it in the backend.
342
+
343
+ Reads entity configuration from a YAML file and creates a new
344
+ context entity in the backend. Raises an error if the entity
345
+ already exists.
304
346
 
305
347
  Parameters
306
348
  ----------
307
349
  file : str
308
- Path to YAML file.
350
+ Path to the YAML file containing entity configuration.
309
351
 
310
352
  Returns
311
353
  -------
312
354
  ContextEntity
313
- Object instance.
355
+ The imported and created context entity.
356
+
357
+ Raises
358
+ ------
359
+ EntityError
360
+ If the entity already exists in the backend.
314
361
  """
315
362
  dict_obj: dict = read_yaml(file)
316
363
  dict_obj["status"] = {}
@@ -327,17 +374,27 @@ class ContextEntityOperationsProcessor:
327
374
  file: str,
328
375
  ) -> ExecutableEntity:
329
376
  """
330
- Import object from a YAML file and create a new object into the backend.
377
+ Import an executable entity from a YAML file and create it in the backend.
378
+
379
+ Reads executable entity configuration from a YAML file and creates
380
+ a new executable entity (function or workflow) in the backend.
381
+ Also imports associated task definitions if present in the file.
331
382
 
332
383
  Parameters
333
384
  ----------
334
385
  file : str
335
- Path to YAML file.
386
+ Path to the YAML file containing executable entity configuration.
387
+ Can contain a single entity or a list with the executable and tasks.
336
388
 
337
389
  Returns
338
390
  -------
339
391
  ExecutableEntity
340
- Object instance.
392
+ The imported and created executable entity.
393
+
394
+ Raises
395
+ ------
396
+ EntityError
397
+ If the entity already exists in the backend.
341
398
  """
342
399
  dict_obj: dict | list[dict] = read_yaml(file)
343
400
  if isinstance(dict_obj, list):
@@ -367,17 +424,21 @@ class ContextEntityOperationsProcessor:
367
424
  file: str,
368
425
  ) -> ContextEntity:
369
426
  """
370
- Load object from a YAML file and update an existing object into the backend.
427
+ Load a context entity from a YAML file and update it in the backend.
428
+
429
+ Reads entity configuration from a YAML file and updates an existing
430
+ entity in the backend. If the entity doesn't exist, it creates a
431
+ new one.
371
432
 
372
433
  Parameters
373
434
  ----------
374
435
  file : str
375
- Path to YAML file.
436
+ Path to the YAML file containing entity configuration.
376
437
 
377
438
  Returns
378
439
  -------
379
440
  ContextEntity
380
- Object instance.
441
+ The loaded and updated context entity.
381
442
  """
382
443
  dict_obj: dict = read_yaml(file)
383
444
  context = get_context_from_project(dict_obj["project"])
@@ -393,17 +454,22 @@ class ContextEntityOperationsProcessor:
393
454
  file: str,
394
455
  ) -> ExecutableEntity:
395
456
  """
396
- Load object from a YAML file and update an existing object into the backend.
457
+ Load an executable entity from a YAML file and update it in the backend.
458
+
459
+ Reads executable entity configuration from a YAML file and updates
460
+ an existing executable entity in the backend. If the entity doesn't
461
+ exist, it creates a new one. Also handles task imports.
397
462
 
398
463
  Parameters
399
464
  ----------
400
465
  file : str
401
- Path to YAML file.
466
+ Path to the YAML file containing executable entity configuration.
467
+ Can contain a single entity or a list with the executable and tasks.
402
468
 
403
469
  Returns
404
470
  -------
405
471
  ExecutableEntity
406
- Object instance.
472
+ The loaded and updated executable entity.
407
473
  """
408
474
  dict_obj: dict | list[dict] = read_yaml(file)
409
475
  if isinstance(dict_obj, list):
@@ -432,25 +498,28 @@ class ContextEntityOperationsProcessor:
432
498
  **kwargs,
433
499
  ) -> list[dict]:
434
500
  """
435
- Get all versions object from backend.
501
+ Read all versions of a context entity from the backend.
502
+
503
+ Retrieves all available versions of a named entity from the
504
+ backend using the entity name identifier.
436
505
 
437
506
  Parameters
438
507
  ----------
439
508
  context : Context
440
- Context instance.
509
+ The project context instance.
441
510
  identifier : str
442
- Entity key (store://...) or entity name.
443
- entity_type : str
444
- Entity type.
445
- project : str
446
- Project name.
511
+ Entity key (store://...) or entity name identifier.
512
+ entity_type : str, optional
513
+ The type of entity to read versions for.
514
+ project : str, optional
515
+ Project name (used for identifier parsing).
447
516
  **kwargs : dict
448
- Parameters to pass to the API call.
517
+ Additional parameters to pass to the API call.
449
518
 
450
519
  Returns
451
520
  -------
452
521
  list[dict]
453
- Object instances.
522
+ List of entity data dictionaries for all versions.
454
523
  """
455
524
  project, entity_type, _, entity_name, _ = parse_identifier(
456
525
  identifier,
@@ -481,23 +550,27 @@ class ContextEntityOperationsProcessor:
481
550
  **kwargs,
482
551
  ) -> list[ContextEntity]:
483
552
  """
484
- Read object versions from backend.
553
+ Read all versions of a context entity from the backend.
554
+
555
+ Retrieves all available versions of a named entity and constructs
556
+ context entity objects for each version. Applies post-processing
557
+ for metrics and file info.
485
558
 
486
559
  Parameters
487
560
  ----------
488
561
  identifier : str
489
- Entity key (store://...) or entity name.
490
- entity_type : str
491
- Entity type.
492
- project : str
493
- Project name.
562
+ Entity key (store://...) or entity name identifier.
563
+ entity_type : str, optional
564
+ The type of entity to read versions for.
565
+ project : str, optional
566
+ Project name for context resolution.
494
567
  **kwargs : dict
495
- Parameters to pass to the API call.
568
+ Additional parameters to pass to the API call.
496
569
 
497
570
  Returns
498
571
  -------
499
572
  list[ContextEntity]
500
- List of object instances.
573
+ List of context entity objects for all versions.
501
574
  """
502
575
  context = get_context_from_identifier(identifier, project)
503
576
  objs = self._read_context_entity_versions(
@@ -521,21 +594,25 @@ class ContextEntityOperationsProcessor:
521
594
  **kwargs,
522
595
  ) -> list[dict]:
523
596
  """
524
- List objects from backend.
597
+ List context entities from the backend.
598
+
599
+ Retrieves a list of entities of a specific type from the backend
600
+ within the project context.
525
601
 
526
602
  Parameters
527
603
  ----------
528
604
  context : Context
529
- Context instance.
605
+ The project context instance.
530
606
  entity_type : str
531
- Entity type.
607
+ The type of entities to list.
532
608
  **kwargs : dict
533
- Parameters to pass to the API call.
609
+ Additional parameters to pass to the API call for filtering
610
+ or pagination.
534
611
 
535
612
  Returns
536
613
  -------
537
614
  list[dict]
538
- List of objects.
615
+ List of entity data dictionaries from the backend.
539
616
  """
540
617
  api = context.client.build_api(
541
618
  ApiCategories.CONTEXT.value,
@@ -552,21 +629,27 @@ class ContextEntityOperationsProcessor:
552
629
  **kwargs,
553
630
  ) -> list[ContextEntity]:
554
631
  """
555
- List all latest version objects from backend.
632
+ List all latest version context entities from the backend.
633
+
634
+ Retrieves a list of entities of a specific type from the backend
635
+ and constructs context entity objects. Only returns the latest
636
+ version of each entity. Applies post-processing for metrics and
637
+ file info.
556
638
 
557
639
  Parameters
558
640
  ----------
559
641
  project : str
560
- Project name.
642
+ The project name to list entities from.
561
643
  entity_type : str
562
- Entity type.
644
+ The type of entities to list.
563
645
  **kwargs : dict
564
- Parameters to pass to the API call.
646
+ Additional parameters to pass to the API call for filtering
647
+ or pagination.
565
648
 
566
649
  Returns
567
650
  -------
568
651
  list[ContextEntity]
569
- List of object instances.
652
+ List of context entity objects (latest versions only).
570
653
  """
571
654
  context = get_context_from_project(project)
572
655
  objs = self._list_context_entities(context, entity_type, **kwargs)
@@ -582,17 +665,20 @@ class ContextEntityOperationsProcessor:
582
665
  new_obj: MaterialEntity,
583
666
  ) -> dict:
584
667
  """
585
- Update material object shortcut.
668
+ Update a material entity using a shortcut method.
669
+
670
+ Convenience method for updating material entities during
671
+ file upload operations.
586
672
 
587
673
  Parameters
588
674
  ----------
589
675
  new_obj : MaterialEntity
590
- Object instance.
676
+ The material entity object to update.
591
677
 
592
678
  Returns
593
679
  -------
594
680
  dict
595
- Response from backend.
681
+ Response data from the backend update operation.
596
682
  """
597
683
  return self.update_context_entity(
598
684
  new_obj.project,
@@ -610,25 +696,29 @@ class ContextEntityOperationsProcessor:
610
696
  **kwargs,
611
697
  ) -> dict:
612
698
  """
613
- Update object. Note that object spec are immutable.
699
+ Update a context entity in the backend.
700
+
701
+ Updates an existing context entity with new data. Entity
702
+ specifications are typically immutable, so this primarily
703
+ updates status and metadata.
614
704
 
615
705
  Parameters
616
706
  ----------
617
707
  context : Context
618
- Context instance.
708
+ The project context instance.
619
709
  entity_type : str
620
- Entity type.
710
+ The type of entity to update.
621
711
  entity_id : str
622
- Entity ID.
712
+ The unique identifier of the entity to update.
623
713
  entity_dict : dict
624
- Entity dictionary.
714
+ The updated entity data dictionary.
625
715
  **kwargs : dict
626
- Parameters to pass to the API call.
716
+ Additional parameters to pass to the API call.
627
717
 
628
718
  Returns
629
719
  -------
630
720
  dict
631
- Response from backend.
721
+ Response data from the backend update operation.
632
722
  """
633
723
  api = context.client.build_api(
634
724
  ApiCategories.CONTEXT.value,
@@ -648,25 +738,29 @@ class ContextEntityOperationsProcessor:
648
738
  **kwargs,
649
739
  ) -> ContextEntity:
650
740
  """
651
- Update object. Note that object spec are immutable.
741
+ Update a context entity in the backend.
742
+
743
+ Updates an existing context entity with new data and returns
744
+ the updated context entity object. Entity specifications are
745
+ typically immutable.
652
746
 
653
747
  Parameters
654
748
  ----------
655
749
  project : str
656
- Project name.
750
+ The project name containing the entity.
657
751
  entity_type : str
658
- Entity type.
752
+ The type of entity to update.
659
753
  entity_id : str
660
- Entity ID.
754
+ The unique identifier of the entity to update.
661
755
  entity_dict : dict
662
- Entity dictionary.
756
+ The updated entity data dictionary.
663
757
  **kwargs : dict
664
- Parameters to pass to the API call.
758
+ Additional parameters to pass to the API call.
665
759
 
666
760
  Returns
667
761
  -------
668
762
  ContextEntity
669
- Object instance.
763
+ The updated context entity object.
670
764
  """
671
765
  context = get_context_from_project(project)
672
766
  obj = self._update_context_entity(
@@ -688,27 +782,33 @@ class ContextEntityOperationsProcessor:
688
782
  **kwargs,
689
783
  ) -> dict:
690
784
  """
691
- Delete object from backend.
785
+ Delete a context entity from the backend.
786
+
787
+ Removes an entity from the backend, with options for deleting
788
+ specific versions or all versions of a named entity. Handles
789
+ cascade deletion if supported.
692
790
 
693
791
  Parameters
694
792
  ----------
695
793
  context : Context
696
- Context instance.
794
+ The project context instance.
697
795
  identifier : str
698
- Entity key (store://...) or entity name.
699
- entity_type : str
700
- Entity type.
701
- project : str
702
- Project name.
703
- entity_id : str
704
- Entity ID.
796
+ Entity key (store://...) or entity name identifier.
797
+ entity_type : str, optional
798
+ The type of entity to delete.
799
+ project : str, optional
800
+ Project name (used for identifier parsing).
801
+ entity_id : str, optional
802
+ Specific entity ID to delete.
705
803
  **kwargs : dict
706
- Parameters to pass to the API call.
804
+ Additional parameters including:
805
+ - 'delete_all_versions': delete all versions of named entity
806
+ - 'cascade': cascade deletion options
707
807
 
708
808
  Returns
709
809
  -------
710
810
  dict
711
- Response from backend.
811
+ Response data from the backend delete operation.
712
812
  """
713
813
  project, entity_type, _, entity_name, entity_id = parse_identifier(
714
814
  identifier,
@@ -754,25 +854,28 @@ class ContextEntityOperationsProcessor:
754
854
  **kwargs,
755
855
  ) -> dict:
756
856
  """
757
- Delete object from backend.
857
+ Delete a context entity from the backend.
858
+
859
+ Removes an entity from the backend with support for deleting
860
+ specific versions or all versions of a named entity.
758
861
 
759
862
  Parameters
760
863
  ----------
761
864
  identifier : str
762
- Entity key (store://...) or entity name.
763
- project : str
764
- Project name.
765
- entity_type : str
766
- Entity type.
767
- entity_id : str
768
- Entity ID.
865
+ Entity key (store://...) or entity name identifier.
866
+ project : str, optional
867
+ Project name for context resolution.
868
+ entity_type : str, optional
869
+ The type of entity to delete.
870
+ entity_id : str, optional
871
+ Specific entity ID to delete.
769
872
  **kwargs : dict
770
- Parameters to pass to the API call.
873
+ Additional parameters including deletion options.
771
874
 
772
875
  Returns
773
876
  -------
774
877
  dict
775
- Response from backend.
878
+ Response data from the backend delete operation.
776
879
  """
777
880
  context = get_context_from_identifier(identifier, project)
778
881
  return self._delete_context_entity(
@@ -786,17 +889,20 @@ class ContextEntityOperationsProcessor:
786
889
 
787
890
  def _post_process_get(self, entity: ContextEntity) -> ContextEntity:
788
891
  """
789
- Post process get (files, metrics).
892
+ Post-process a retrieved context entity.
893
+
894
+ Applies additional processing to entities after retrieval,
895
+ including loading metrics and file information if available.
790
896
 
791
897
  Parameters
792
898
  ----------
793
899
  entity : ContextEntity
794
- Entity to post process.
900
+ The entity to post-process.
795
901
 
796
902
  Returns
797
903
  -------
798
904
  ContextEntity
799
- Post processed entity.
905
+ The post-processed entity with additional data loaded.
800
906
  """
801
907
  if hasattr(entity.status, "metrics"):
802
908
  entity._get_metrics()
@@ -817,25 +923,28 @@ class ContextEntityOperationsProcessor:
817
923
  entity_id: str | None = None,
818
924
  ) -> str:
819
925
  """
820
- Build object key.
926
+ Build a storage key for a context entity.
927
+
928
+ Creates a standardized key string for context entity identification
929
+ and storage within a project context.
821
930
 
822
931
  Parameters
823
932
  ----------
824
933
  context : Context
825
- Context instance.
934
+ The project context instance.
826
935
  entity_type : str
827
- Entity type.
936
+ The type of entity.
828
937
  entity_kind : str
829
- Entity kind.
938
+ The kind/subtype of entity.
830
939
  entity_name : str
831
- Entity name.
832
- entity_id : str
833
- Entity ID.
940
+ The name of the entity.
941
+ entity_id : str, optional
942
+ The unique identifier of the entity version.
834
943
 
835
944
  Returns
836
945
  -------
837
946
  str
838
- Object key.
947
+ The constructed context entity key string.
839
948
  """
840
949
  return context.client.build_key(
841
950
  ApiCategories.CONTEXT.value,
@@ -855,25 +964,28 @@ class ContextEntityOperationsProcessor:
855
964
  entity_id: str | None = None,
856
965
  ) -> str:
857
966
  """
858
- Build object key.
967
+ Build a storage key for a context entity.
968
+
969
+ Creates a standardized key string for context entity identification
970
+ and storage, resolving the project context automatically.
859
971
 
860
972
  Parameters
861
973
  ----------
862
974
  project : str
863
- Project name.
975
+ The project name containing the entity.
864
976
  entity_type : str
865
- Entity type.
977
+ The type of entity.
866
978
  entity_kind : str
867
- Entity kind.
979
+ The kind/subtype of entity.
868
980
  entity_name : str
869
- Entity name.
870
- entity_id : str
871
- Entity ID.
981
+ The name of the entity.
982
+ entity_id : str, optional
983
+ The unique identifier of the entity version.
872
984
 
873
985
  Returns
874
986
  -------
875
987
  str
876
- Object key.
988
+ The constructed context entity key string.
877
989
  """
878
990
  context = get_context_from_project(project)
879
991
  return self._build_context_entity_key(context, entity_type, entity_kind, entity_name, entity_id)
@@ -885,21 +997,24 @@ class ContextEntityOperationsProcessor:
885
997
  **kwargs,
886
998
  ) -> dict:
887
999
  """
888
- Get data from backend.
1000
+ Read secret data from the backend.
1001
+
1002
+ Retrieves secret data stored in the backend for a specific
1003
+ project and entity type.
889
1004
 
890
1005
  Parameters
891
1006
  ----------
892
1007
  project : str
893
- Project name.
1008
+ The project name containing the secrets.
894
1009
  entity_type : str
895
- Entity type.
1010
+ The type of entity (typically 'secret').
896
1011
  **kwargs : dict
897
- Parameters to pass to the API call.
1012
+ Additional parameters to pass to the API call.
898
1013
 
899
1014
  Returns
900
1015
  -------
901
1016
  dict
902
- Response from backend.
1017
+ Secret data retrieved from the backend.
903
1018
  """
904
1019
  context = get_context_from_project(project)
905
1020
  api = context.client.build_api(
@@ -918,18 +1033,21 @@ class ContextEntityOperationsProcessor:
918
1033
  **kwargs,
919
1034
  ) -> None:
920
1035
  """
921
- Set data in backend.
1036
+ Update secret data in the backend.
1037
+
1038
+ Stores or updates secret data in the backend for a specific
1039
+ project and entity type.
922
1040
 
923
1041
  Parameters
924
1042
  ----------
925
1043
  project : str
926
- Project name.
1044
+ The project name to store secrets in.
927
1045
  entity_type : str
928
- Entity type.
1046
+ The type of entity (typically 'secret').
929
1047
  data : dict
930
- Data dictionary.
1048
+ The secret data dictionary to store.
931
1049
  **kwargs : dict
932
- Parameters to pass to the API call.
1050
+ Additional parameters to pass to the API call.
933
1051
 
934
1052
  Returns
935
1053
  -------
@@ -952,23 +1070,26 @@ class ContextEntityOperationsProcessor:
952
1070
  **kwargs,
953
1071
  ) -> dict:
954
1072
  """
955
- Get logs from backend.
1073
+ Read execution logs from the backend.
1074
+
1075
+ Retrieves logs for a specific run or task execution from
1076
+ the backend.
956
1077
 
957
1078
  Parameters
958
1079
  ----------
959
1080
  project : str
960
- Project name.
1081
+ The project name containing the entity.
961
1082
  entity_type : str
962
- Entity type.
1083
+ The type of entity (typically 'run' or 'task').
963
1084
  entity_id : str
964
- Entity ID.
1085
+ The unique identifier of the entity to get logs for.
965
1086
  **kwargs : dict
966
- Parameters to pass to the API call.
1087
+ Additional parameters to pass to the API call.
967
1088
 
968
1089
  Returns
969
1090
  -------
970
1091
  dict
971
- Response from backend.
1092
+ Log data retrieved from the backend.
972
1093
  """
973
1094
  context = get_context_from_project(project)
974
1095
  api = context.client.build_api(
@@ -980,7 +1101,7 @@ class ContextEntityOperationsProcessor:
980
1101
  )
981
1102
  return context.client.read_object(api, **kwargs)
982
1103
 
983
- def stop_run(
1104
+ def stop_entity(
984
1105
  self,
985
1106
  project: str,
986
1107
  entity_type: str,
@@ -988,18 +1109,21 @@ class ContextEntityOperationsProcessor:
988
1109
  **kwargs,
989
1110
  ) -> None:
990
1111
  """
991
- Stop object in backend.
1112
+ Stop a running entity in the backend.
1113
+
1114
+ Sends a stop signal to halt execution of a running entity
1115
+ such as a workflow or long-running task.
992
1116
 
993
1117
  Parameters
994
1118
  ----------
995
1119
  project : str
996
- Project name.
1120
+ The project name containing the entity.
997
1121
  entity_type : str
998
- Entity type.
1122
+ The type of entity to stop.
999
1123
  entity_id : str
1000
- Entity ID.
1124
+ The unique identifier of the entity to stop.
1001
1125
  **kwargs : dict
1002
- Parameters to pass to the API call.
1126
+ Additional parameters to pass to the API call.
1003
1127
 
1004
1128
  Returns
1005
1129
  -------
@@ -1015,7 +1139,7 @@ class ContextEntityOperationsProcessor:
1015
1139
  )
1016
1140
  context.client.create_object(api, **kwargs)
1017
1141
 
1018
- def resume_run(
1142
+ def resume_entity(
1019
1143
  self,
1020
1144
  project: str,
1021
1145
  entity_type: str,
@@ -1023,18 +1147,21 @@ class ContextEntityOperationsProcessor:
1023
1147
  **kwargs,
1024
1148
  ) -> None:
1025
1149
  """
1026
- Resume object in backend.
1150
+ Resume a stopped entity in the backend.
1151
+
1152
+ Sends a resume signal to restart execution of a previously
1153
+ stopped entity such as a workflow or task.
1027
1154
 
1028
1155
  Parameters
1029
1156
  ----------
1030
1157
  project : str
1031
- Project name.
1158
+ The project name containing the entity.
1032
1159
  entity_type : str
1033
- Entity type.
1160
+ The type of entity to resume.
1034
1161
  entity_id : str
1035
- Entity ID.
1162
+ The unique identifier of the entity to resume.
1036
1163
  **kwargs : dict
1037
- Parameters to pass to the API call.
1164
+ Additional parameters to pass to the API call.
1038
1165
 
1039
1166
  Returns
1040
1167
  -------
@@ -1058,23 +1185,26 @@ class ContextEntityOperationsProcessor:
1058
1185
  **kwargs,
1059
1186
  ) -> list[dict]:
1060
1187
  """
1061
- Get files info from backend.
1188
+ Read file information from the backend.
1189
+
1190
+ Retrieves metadata about files associated with an entity,
1191
+ including file paths, sizes, and other attributes.
1062
1192
 
1063
1193
  Parameters
1064
1194
  ----------
1065
1195
  project : str
1066
- Project name.
1196
+ The project name containing the entity.
1067
1197
  entity_type : str
1068
- Entity type.
1198
+ The type of entity to get file info for.
1069
1199
  entity_id : str
1070
- Entity ID.
1200
+ The unique identifier of the entity.
1071
1201
  **kwargs : dict
1072
- Parameters to pass to the API call.
1202
+ Additional parameters to pass to the API call.
1073
1203
 
1074
1204
  Returns
1075
1205
  -------
1076
1206
  list[dict]
1077
- Response from backend.
1207
+ List of file information dictionaries from the backend.
1078
1208
  """
1079
1209
  context = get_context_from_project(project)
1080
1210
  api = context.client.build_api(
@@ -1133,23 +1263,30 @@ class ContextEntityOperationsProcessor:
1133
1263
  **kwargs,
1134
1264
  ) -> dict:
1135
1265
  """
1136
- Get metrics from backend.
1266
+ Read metrics from the backend for a specific entity.
1267
+
1268
+ Retrieves metrics data associated with an entity. Can fetch either
1269
+ all metrics or a specific metric by name. Used for performance
1270
+ monitoring and analysis of entity operations.
1137
1271
 
1138
1272
  Parameters
1139
1273
  ----------
1140
1274
  project : str
1141
- Project name.
1275
+ The project name containing the entity.
1142
1276
  entity_type : str
1143
- Entity type.
1277
+ The type of entity to read metrics from.
1144
1278
  entity_id : str
1145
- Entity ID.
1279
+ The unique identifier of the entity.
1280
+ metric_name : str, optional
1281
+ The name of a specific metric to retrieve.
1282
+ If None, retrieves all available metrics.
1146
1283
  **kwargs : dict
1147
- Parameters to pass to the API call.
1284
+ Additional parameters to pass to the API call.
1148
1285
 
1149
1286
  Returns
1150
1287
  -------
1151
1288
  dict
1152
- Response from backend.
1289
+ Dictionary containing metric data from the backend.
1153
1290
  """
1154
1291
  context = get_context_from_project(project)
1155
1292
  api = context.client.build_api(
@@ -1172,18 +1309,27 @@ class ContextEntityOperationsProcessor:
1172
1309
  **kwargs,
1173
1310
  ) -> None:
1174
1311
  """
1175
- Get single metric from backend.
1312
+ Update or create a metric value for an entity in the backend.
1313
+
1314
+ Updates an existing metric or creates a new one with the specified
1315
+ value. Metrics are used for tracking performance, status, and
1316
+ other quantitative aspects of entity operations.
1176
1317
 
1177
1318
  Parameters
1178
1319
  ----------
1179
1320
  project : str
1180
- Project name.
1321
+ The project name containing the entity.
1181
1322
  entity_type : str
1182
- Entity type.
1323
+ The type of entity to update metrics for.
1183
1324
  entity_id : str
1184
- Entity ID.
1325
+ The unique identifier of the entity.
1326
+ metric_name : str
1327
+ The name of the metric to update or create.
1328
+ metric_value : Any
1329
+ The value to set for the metric.
1330
+ Can be numeric, string, or other supported types.
1185
1331
  **kwargs : dict
1186
- Parameters to pass to the API call.
1332
+ Additional parameters to pass to the API call.
1187
1333
 
1188
1334
  Returns
1189
1335
  -------
@@ -1206,19 +1352,23 @@ class ContextEntityOperationsProcessor:
1206
1352
  **kwargs,
1207
1353
  ) -> dict:
1208
1354
  """
1209
- Search in backend.
1355
+ Execute search query against the backend API.
1356
+
1357
+ Internal method that performs the actual search operation
1358
+ by building API parameters, executing the search request,
1359
+ and processing the results into entity objects.
1210
1360
 
1211
1361
  Parameters
1212
1362
  ----------
1213
1363
  context : Context
1214
- Context instance.
1364
+ The context instance containing client and project information.
1215
1365
  **kwargs : dict
1216
- Parameters to pass to the API call.
1366
+ Search parameters and filters to pass to the API call.
1217
1367
 
1218
1368
  Returns
1219
1369
  -------
1220
1370
  dict
1221
- Response from backend.
1371
+ List of context entity objects matching the search criteria.
1222
1372
  """
1223
1373
  kwargs = context.client.build_parameters(
1224
1374
  ApiCategories.CONTEXT.value,
@@ -1247,35 +1397,40 @@ class ContextEntityOperationsProcessor:
1247
1397
  **kwargs,
1248
1398
  ) -> list[ContextEntity]:
1249
1399
  """
1250
- Search objects from backend.
1400
+ Search for entities in the backend using various criteria.
1401
+
1402
+ Performs a flexible search across multiple entity attributes,
1403
+ allowing for complex queries and filtering. Returns matching
1404
+ entities from the project context.
1251
1405
 
1252
1406
  Parameters
1253
1407
  ----------
1254
1408
  project : str
1255
- Project name.
1256
- query : str
1257
- Search query.
1258
- entity_types : list[str]
1259
- Entity types.
1260
- name : str
1261
- Entity name.
1262
- kind : str
1263
- Entity kind.
1264
- created : str
1265
- Entity creation date.
1266
- updated : str
1267
- Entity update date.
1268
- description : str
1269
- Entity description.
1270
- labels : list[str]
1271
- Entity labels.
1409
+ The project name to search within.
1410
+ query : str, optional
1411
+ Free-text search query to match against entity content.
1412
+ entity_types : list[str], optional
1413
+ List of entity types to filter by.
1414
+ If None, searches all entity types.
1415
+ name : str, optional
1416
+ Entity name pattern to match.
1417
+ kind : str, optional
1418
+ Entity kind to filter by.
1419
+ created : str, optional
1420
+ Creation date filter (ISO format).
1421
+ updated : str, optional
1422
+ Last update date filter (ISO format).
1423
+ description : str, optional
1424
+ Description pattern to match.
1425
+ labels : list[str], optional
1426
+ List of label patterns to match.
1272
1427
  **kwargs : dict
1273
- Parameters to pass to the API call.
1428
+ Additional search parameters to pass to the API call.
1274
1429
 
1275
1430
  Returns
1276
1431
  -------
1277
1432
  list[ContextEntity]
1278
- List of object instances.
1433
+ List of matching entity instances from the search.
1279
1434
  """
1280
1435
  context = get_context_from_project(project)
1281
1436
  return self._search(