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
@@ -16,11 +20,12 @@ if typing.TYPE_CHECKING:
16
20
 
17
21
  class BaseEntityOperationsProcessor:
18
22
  """
19
- Processor for Base Entity operations.
23
+ Processor for base entity operations.
20
24
 
21
- This object interacts with the context, check the category of the object,
22
- and then calls the appropriate method to perform the requested operation.
23
- Operations can be CRUD, search, list, etc.
25
+ This class handles CRUD operations and other entity management tasks
26
+ for base-level entities (primarily projects). It interacts with the
27
+ client layer to perform backend operations and manages entity lifecycle
28
+ including creation, reading, updating, deletion, and sharing.
24
29
  """
25
30
 
26
31
  ##############################
@@ -35,23 +40,26 @@ class BaseEntityOperationsProcessor:
35
40
  **kwargs,
36
41
  ) -> dict:
37
42
  """
38
- Create object in backend.
43
+ Create a base entity in the backend.
44
+
45
+ Builds the appropriate API endpoint and sends a create request
46
+ to the backend for base-level entities.
39
47
 
40
48
  Parameters
41
49
  ----------
42
50
  client : Client
43
- Client instance.
51
+ The client instance to use for the API call.
44
52
  entity_type : str
45
- Entity type.
53
+ The type of entity to create (e.g., 'project').
46
54
  entity_dict : dict
47
- Object instance.
55
+ The entity data dictionary to create.
48
56
  **kwargs : dict
49
- Parameters to pass to the API call.
57
+ Additional parameters to pass to the API call.
50
58
 
51
59
  Returns
52
60
  -------
53
61
  dict
54
- Object instance.
62
+ The created entity data returned from the backend.
55
63
  """
56
64
  api = client.build_api(
57
65
  ApiCategories.BASE.value,
@@ -66,19 +74,25 @@ class BaseEntityOperationsProcessor:
66
74
  **kwargs,
67
75
  ) -> Project:
68
76
  """
69
- Create object in backend.
77
+ Create a project entity in the backend.
78
+
79
+ Creates a new project either from an existing entity object or
80
+ by building one from the provided parameters. Handles both
81
+ local and remote backend creation.
70
82
 
71
83
  Parameters
72
84
  ----------
73
- _entity : Project
74
- Object instance.
85
+ _entity : Project, optional
86
+ An existing project entity object to create. If None,
87
+ a new entity will be built from kwargs.
75
88
  **kwargs : dict
76
- Parameters to pass to entity builder.
89
+ Parameters for entity creation, including 'local' flag
90
+ and entity-specific parameters.
77
91
 
78
92
  Returns
79
93
  -------
80
94
  Project
81
- Object instance.
95
+ The created project entity with backend data populated.
82
96
  """
83
97
  if _entity is not None:
84
98
  client = _entity._client
@@ -98,23 +112,26 @@ class BaseEntityOperationsProcessor:
98
112
  **kwargs,
99
113
  ) -> dict:
100
114
  """
101
- Read object from backend.
115
+ Read a base entity from the backend.
116
+
117
+ Builds the appropriate API endpoint and sends a read request
118
+ to retrieve entity data from the backend.
102
119
 
103
120
  Parameters
104
121
  ----------
105
122
  client : Client
106
- Client instance.
123
+ The client instance to use for the API call.
107
124
  entity_type : str
108
- Entity type.
125
+ The type of entity to read (e.g., 'project').
109
126
  entity_name : str
110
- Entity name.
127
+ The name identifier of the entity to read.
111
128
  **kwargs : dict
112
- Parameters to pass to the API call.
129
+ Additional parameters to pass to the API call.
113
130
 
114
131
  Returns
115
132
  -------
116
133
  dict
117
- Object instance.
134
+ The entity data retrieved from the backend.
118
135
  """
119
136
  api = client.build_api(
120
137
  ApiCategories.BASE.value,
@@ -131,21 +148,25 @@ class BaseEntityOperationsProcessor:
131
148
  **kwargs,
132
149
  ) -> Project:
133
150
  """
134
- Read object from backend.
151
+ Read a project entity from the backend.
152
+
153
+ Retrieves project data from the backend and constructs a
154
+ Project entity object with the retrieved data.
135
155
 
136
156
  Parameters
137
157
  ----------
138
158
  entity_type : str
139
- Entity type.
159
+ The type of entity to read (typically 'project').
140
160
  entity_name : str
141
- Entity name.
161
+ The name identifier of the project to read.
142
162
  **kwargs : dict
143
- Parameters to pass to entity builder.
163
+ Additional parameters including 'local' flag and
164
+ API call parameters.
144
165
 
145
166
  Returns
146
167
  -------
147
168
  Project
148
- Object instance.
169
+ The project entity object populated with backend data.
149
170
  """
150
171
  client = get_client(kwargs.pop("local", False))
151
172
  obj = self._read_base_entity(client, entity_type, entity_name, **kwargs)
@@ -158,19 +179,28 @@ class BaseEntityOperationsProcessor:
158
179
  **kwargs,
159
180
  ) -> Project:
160
181
  """
161
- Import object from a YAML file and create a new object into the backend.
182
+ Import a project entity from a YAML file and create it in the backend.
183
+
184
+ Reads project configuration from a YAML file, creates a new project
185
+ entity in the backend, and imports any related entities defined
186
+ in the file. Raises an error if the project already exists.
162
187
 
163
188
  Parameters
164
189
  ----------
165
190
  file : str
166
- Path to YAML file.
191
+ Path to the YAML file containing project configuration.
167
192
  **kwargs : dict
168
- Additional keyword arguments.
193
+ Additional parameters including 'local' flag.
169
194
 
170
195
  Returns
171
196
  -------
172
197
  Project
173
- Object instance.
198
+ The imported and created project entity.
199
+
200
+ Raises
201
+ ------
202
+ EntityError
203
+ If the project already exists in the backend.
174
204
  """
175
205
  client = get_client(kwargs.pop("local", False))
176
206
  obj: dict = read_yaml(file)
@@ -194,19 +224,23 @@ class BaseEntityOperationsProcessor:
194
224
  **kwargs,
195
225
  ) -> Project:
196
226
  """
197
- Load object from a YAML file and update an existing object into the backend.
227
+ Load a project entity from a YAML file and update it in the backend.
228
+
229
+ Reads project configuration from a YAML file and updates an existing
230
+ project in the backend. If the project doesn't exist, it creates a
231
+ new one. Also loads any related entities defined in the file.
198
232
 
199
233
  Parameters
200
234
  ----------
201
235
  file : str
202
- Path to YAML file.
236
+ Path to the YAML file containing project configuration.
203
237
  **kwargs : dict
204
- Additional keyword arguments.
238
+ Additional parameters including 'local' flag.
205
239
 
206
240
  Returns
207
241
  -------
208
242
  Project
209
- Object instance.
243
+ The loaded and updated project entity.
210
244
  """
211
245
  client = get_client(kwargs.pop("local", False))
212
246
  obj: dict = read_yaml(file)
@@ -230,21 +264,25 @@ class BaseEntityOperationsProcessor:
230
264
  **kwargs,
231
265
  ) -> list[dict]:
232
266
  """
233
- List objects from backend.
267
+ List base entities from the backend.
268
+
269
+ Builds the appropriate API endpoint and sends a list request
270
+ to retrieve multiple entities from the backend.
234
271
 
235
272
  Parameters
236
273
  ----------
237
274
  client : Client
238
- Client instance.
275
+ The client instance to use for the API call.
239
276
  entity_type : str
240
- Entity type.
277
+ The type of entities to list (e.g., 'project').
241
278
  **kwargs : dict
242
- Parameters to pass to the API call.
279
+ Additional parameters to pass to the API call for filtering
280
+ or pagination.
243
281
 
244
282
  Returns
245
283
  -------
246
284
  list[dict]
247
- List of objects.
285
+ List of entity data dictionaries from the backend.
248
286
  """
249
287
  api = client.build_api(
250
288
  ApiCategories.BASE.value,
@@ -259,19 +297,23 @@ class BaseEntityOperationsProcessor:
259
297
  **kwargs,
260
298
  ) -> list[Project]:
261
299
  """
262
- List objects from backend.
300
+ List project entities from the backend.
301
+
302
+ Retrieves a list of projects from the backend and converts
303
+ them to Project entity objects.
263
304
 
264
305
  Parameters
265
306
  ----------
266
307
  entity_type : str
267
- Entity type.
308
+ The type of entities to list (typically 'project').
268
309
  **kwargs : dict
269
- Parameters to pass to API call.
310
+ Additional parameters including 'local' flag and
311
+ API call parameters for filtering or pagination.
270
312
 
271
313
  Returns
272
314
  -------
273
315
  list[Project]
274
- List of objects.
316
+ List of project entity objects.
275
317
  """
276
318
  client = get_client(kwargs.pop("local", False))
277
319
  objs = self._list_base_entities(client, entity_type, **kwargs)
@@ -291,25 +333,28 @@ class BaseEntityOperationsProcessor:
291
333
  **kwargs,
292
334
  ) -> dict:
293
335
  """
294
- Update object method.
336
+ Update a base entity in the backend.
337
+
338
+ Builds the appropriate API endpoint and sends an update request
339
+ to modify an existing entity in the backend.
295
340
 
296
341
  Parameters
297
342
  ----------
298
343
  client : Client
299
- Client instance.
344
+ The client instance to use for the API call.
300
345
  entity_type : str
301
- Entity type.
346
+ The type of entity to update (e.g., 'project').
302
347
  entity_name : str
303
- Entity name.
348
+ The name identifier of the entity to update.
304
349
  entity_dict : dict
305
- Object instance.
350
+ The updated entity data dictionary.
306
351
  **kwargs : dict
307
- Parameters to pass to the API call.
352
+ Additional parameters to pass to the API call.
308
353
 
309
354
  Returns
310
355
  -------
311
356
  dict
312
- Object instance.
357
+ The updated entity data returned from the backend.
313
358
  """
314
359
  api = client.build_api(
315
360
  ApiCategories.BASE.value,
@@ -327,23 +372,27 @@ class BaseEntityOperationsProcessor:
327
372
  **kwargs,
328
373
  ) -> Project:
329
374
  """
330
- Update object method.
375
+ Update a project entity in the backend.
376
+
377
+ Updates an existing project with new data and returns the
378
+ updated Project entity object.
331
379
 
332
380
  Parameters
333
381
  ----------
334
382
  entity_type : str
335
- Entity type.
383
+ The type of entity to update (typically 'project').
336
384
  entity_name : str
337
- Entity name.
385
+ The name identifier of the project to update.
338
386
  entity_dict : dict
339
- Object instance.
387
+ The updated project data dictionary.
340
388
  **kwargs : dict
341
- Parameters to pass to entity builder.
389
+ Additional parameters including 'local' flag and
390
+ API call parameters.
342
391
 
343
392
  Returns
344
393
  -------
345
394
  Project
346
- Object instance.
395
+ The updated project entity object.
347
396
  """
348
397
  client = get_client(kwargs.pop("local", False))
349
398
  obj = self._update_base_entity(client, entity_type, entity_name, entity_dict, **kwargs)
@@ -358,23 +407,27 @@ class BaseEntityOperationsProcessor:
358
407
  **kwargs,
359
408
  ) -> dict:
360
409
  """
361
- Delete object method.
410
+ Delete a base entity from the backend.
411
+
412
+ Builds the appropriate API endpoint and parameters, then sends
413
+ a delete request to remove the entity from the backend.
362
414
 
363
415
  Parameters
364
416
  ----------
365
417
  client : Client
366
- Client instance.
418
+ The client instance to use for the API call.
367
419
  entity_type : str
368
- Entity type.
420
+ The type of entity to delete (e.g., 'project').
369
421
  entity_name : str
370
- Entity name.
422
+ The name identifier of the entity to delete.
371
423
  **kwargs : dict
372
- Parameters to pass to the API call.
424
+ Additional parameters to pass to the API call, such as
425
+ cascade deletion options.
373
426
 
374
427
  Returns
375
428
  -------
376
429
  dict
377
- Response from backend.
430
+ Response data from the backend delete operation.
378
431
  """
379
432
  kwargs = client.build_parameters(
380
433
  ApiCategories.BASE.value,
@@ -396,21 +449,25 @@ class BaseEntityOperationsProcessor:
396
449
  **kwargs,
397
450
  ) -> dict:
398
451
  """
399
- Delete object method.
452
+ Delete a project entity from the backend.
453
+
454
+ Deletes a project from the backend and optionally cleans up
455
+ the associated context. Handles both local and remote backends.
400
456
 
401
457
  Parameters
402
458
  ----------
403
459
  entity_type : str
404
- Entity type.
460
+ The type of entity to delete (typically 'project').
405
461
  entity_name : str
406
- Entity name.
462
+ The name identifier of the project to delete.
407
463
  **kwargs : dict
408
- Parameters to pass to entity builder.
464
+ Additional parameters including 'local' flag, 'clean_context'
465
+ flag (default True), and API call parameters.
409
466
 
410
467
  Returns
411
468
  -------
412
469
  dict
413
- Response from backend.
470
+ Response data from the backend delete operation.
414
471
  """
415
472
  if kwargs.pop("clean_context", True):
416
473
  delete_context(entity_name)
@@ -432,19 +489,22 @@ class BaseEntityOperationsProcessor:
432
489
  entity_id: str,
433
490
  ) -> str:
434
491
  """
435
- Build object key.
492
+ Build a storage key for a base entity.
493
+
494
+ Creates a standardized key string that can be used to identify
495
+ and store the entity in various contexts.
436
496
 
437
497
  Parameters
438
498
  ----------
439
499
  client : Client
440
- Client instance.
500
+ The client instance to use for key building.
441
501
  entity_id : str
442
- Entity ID.
502
+ The unique identifier of the entity.
443
503
 
444
504
  Returns
445
505
  -------
446
506
  str
447
- Object key.
507
+ The constructed entity key string.
448
508
  """
449
509
  return client.build_key(ApiCategories.BASE.value, entity_id)
450
510
 
@@ -454,19 +514,22 @@ class BaseEntityOperationsProcessor:
454
514
  **kwargs,
455
515
  ) -> str:
456
516
  """
457
- Build object key.
517
+ Build a storage key for a project entity.
518
+
519
+ Creates a standardized key string for project identification
520
+ and storage, handling both local and remote client contexts.
458
521
 
459
522
  Parameters
460
523
  ----------
461
524
  entity_id : str
462
- Entity ID.
525
+ The unique identifier of the project entity.
463
526
  **kwargs : dict
464
- Parameters to pass to entity builder.
527
+ Additional parameters including 'local' flag.
465
528
 
466
529
  Returns
467
530
  -------
468
531
  str
469
- Object key.
532
+ The constructed project entity key string.
470
533
  """
471
534
  client = get_client(kwargs.pop("local", False))
472
535
  return self._build_base_entity_key(client, entity_id)
@@ -478,20 +541,32 @@ class BaseEntityOperationsProcessor:
478
541
  **kwargs,
479
542
  ) -> None:
480
543
  """
481
- Share object method.
544
+ Share or unshare a project entity with a user.
545
+
546
+ Manages project access permissions by sharing the project with
547
+ a specified user or removing user access. Handles both sharing
548
+ and unsharing operations based on the 'unshare' parameter.
482
549
 
483
550
  Parameters
484
551
  ----------
485
552
  entity_type : str
486
- Entity type.
553
+ The type of entity to share (typically 'project').
487
554
  entity_name : str
488
- Entity name.
555
+ The name identifier of the project to share.
489
556
  **kwargs : dict
490
- Parameters to pass to entity builder.
557
+ Additional parameters including:
558
+ - 'user': username to share with/unshare from
559
+ - 'unshare': boolean flag for unsharing (default False)
560
+ - 'local': boolean flag for local backend
491
561
 
492
562
  Returns
493
563
  -------
494
564
  None
565
+
566
+ Raises
567
+ ------
568
+ ValueError
569
+ If trying to unshare from a user who doesn't have access.
495
570
  """
496
571
  client = get_client(kwargs.pop("local", False))
497
572
  api = client.build_api(