digitalhub 0.14.0b3__py3-none-any.whl → 0.14.0b4__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 (38) hide show
  1. digitalhub/entities/_base/executable/entity.py +160 -58
  2. digitalhub/entities/_base/material/entity.py +4 -0
  3. digitalhub/entities/_base/material/utils.py +28 -0
  4. digitalhub/entities/_commons/enums.py +0 -31
  5. digitalhub/entities/_constructors/_resources.py +151 -0
  6. digitalhub/entities/_constructors/name.py +18 -0
  7. digitalhub/entities/_processors/base/crud.py +1 -1
  8. digitalhub/entities/_processors/base/special_ops.py +1 -1
  9. digitalhub/entities/_processors/context/crud.py +25 -25
  10. digitalhub/entities/_processors/context/special_ops.py +1 -1
  11. digitalhub/entities/_processors/utils.py +2 -1
  12. digitalhub/entities/artifact/crud.py +37 -17
  13. digitalhub/entities/dataitem/crud.py +37 -13
  14. digitalhub/entities/dataitem/table/entity.py +3 -0
  15. digitalhub/entities/function/crud.py +39 -19
  16. digitalhub/entities/model/crud.py +37 -17
  17. digitalhub/entities/project/_base/entity.py +5 -5
  18. digitalhub/entities/project/crud.py +6 -20
  19. digitalhub/entities/run/_base/entity.py +1 -1
  20. digitalhub/entities/run/crud.py +54 -21
  21. digitalhub/entities/secret/crud.py +6 -20
  22. digitalhub/entities/task/crud.py +40 -25
  23. digitalhub/entities/trigger/crud.py +43 -19
  24. digitalhub/entities/workflow/crud.py +39 -16
  25. digitalhub/stores/client/_base/enums.py +39 -0
  26. digitalhub/stores/client/_base/key_builder.py +1 -1
  27. digitalhub/stores/client/_base/params_builder.py +48 -0
  28. digitalhub/stores/client/dhcore/api_builder.py +2 -1
  29. digitalhub/stores/client/dhcore/client.py +67 -55
  30. digitalhub/stores/client/dhcore/params_builder.py +130 -75
  31. digitalhub/stores/client/local/api_builder.py +1 -1
  32. digitalhub/stores/client/local/params_builder.py +18 -41
  33. digitalhub/stores/data/s3/store.py +8 -5
  34. {digitalhub-0.14.0b3.dist-info → digitalhub-0.14.0b4.dist-info}/METADATA +1 -1
  35. {digitalhub-0.14.0b3.dist-info → digitalhub-0.14.0b4.dist-info}/RECORD +38 -36
  36. {digitalhub-0.14.0b3.dist-info → digitalhub-0.14.0b4.dist-info}/WHEEL +0 -0
  37. {digitalhub-0.14.0b3.dist-info → digitalhub-0.14.0b4.dist-info}/licenses/AUTHORS +0 -0
  38. {digitalhub-0.14.0b3.dist-info → digitalhub-0.14.0b4.dist-info}/licenses/LICENSE +0 -0
@@ -6,13 +6,14 @@ from __future__ import annotations
6
6
 
7
7
  import typing
8
8
 
9
- from digitalhub.entities._commons.enums import ApiCategories, BackendOperations
9
+ from digitalhub.entities._commons.utils import is_valid_key
10
10
  from digitalhub.entities._processors.utils import (
11
11
  get_context_from_identifier,
12
12
  get_context_from_project,
13
13
  parse_identifier,
14
14
  )
15
15
  from digitalhub.factory.entity import entity_factory
16
+ from digitalhub.stores.client._base.enums import ApiCategories, BackendOperations
16
17
 
17
18
  if typing.TYPE_CHECKING:
18
19
  from digitalhub.context.context import Context
@@ -141,7 +142,7 @@ class ContextEntityCRUDProcessor:
141
142
  )
142
143
 
143
144
  if entity_id is None:
144
- kwargs["entity_name"] = entity_name
145
+ kwargs["name"] = entity_name
145
146
  kwargs = context.client.build_parameters(
146
147
  ApiCategories.CONTEXT.value,
147
148
  BackendOperations.READ.value,
@@ -243,8 +244,6 @@ class ContextEntityCRUDProcessor:
243
244
  UnversionedEntity
244
245
  The unversioned entity object populated with backend data.
245
246
  """
246
- from digitalhub.entities._commons.utils import is_valid_key
247
-
248
247
  if not is_valid_key(identifier):
249
248
  entity_id = identifier
250
249
  else:
@@ -300,7 +299,7 @@ class ContextEntityCRUDProcessor:
300
299
  kwargs = context.client.build_parameters(
301
300
  ApiCategories.CONTEXT.value,
302
301
  BackendOperations.READ_ALL_VERSIONS.value,
303
- entity_name=entity_name,
302
+ name=entity_name,
304
303
  **kwargs,
305
304
  )
306
305
 
@@ -384,6 +383,11 @@ class ContextEntityCRUDProcessor:
384
383
  list[dict]
385
384
  List of entity data dictionaries from the backend.
386
385
  """
386
+ kwargs = context.client.build_parameters(
387
+ ApiCategories.CONTEXT.value,
388
+ BackendOperations.LIST.value,
389
+ **kwargs,
390
+ )
387
391
  api = context.client.build_api(
388
392
  ApiCategories.CONTEXT.value,
389
393
  BackendOperations.LIST.value,
@@ -561,31 +565,27 @@ class ContextEntityCRUDProcessor:
561
565
  )
562
566
 
563
567
  delete_all_versions: bool = kwargs.pop("delete_all_versions", False)
568
+ if delete_all_versions:
569
+ op = BackendOperations.DELETE_ALL_VERSIONS.value
570
+ kwargs["name"] = entity_name
571
+ else:
572
+ if entity_id is None:
573
+ raise ValueError("If `delete_all_versions` is False, `entity_id` must be provided.")
574
+ op = BackendOperations.DELETE.value
575
+
564
576
  kwargs = context.client.build_parameters(
565
577
  ApiCategories.CONTEXT.value,
566
- BackendOperations.DELETE.value,
567
- entity_id=entity_id,
568
- entity_name=entity_name,
569
- cascade=kwargs.pop("cascade", None),
570
- delete_all_versions=delete_all_versions,
578
+ op,
571
579
  **kwargs,
572
580
  )
573
581
 
574
- if delete_all_versions:
575
- api = context.client.build_api(
576
- ApiCategories.CONTEXT.value,
577
- BackendOperations.LIST.value,
578
- project=context.name,
579
- entity_type=entity_type,
580
- )
581
- else:
582
- api = context.client.build_api(
583
- ApiCategories.CONTEXT.value,
584
- BackendOperations.DELETE.value,
585
- project=context.name,
586
- entity_type=entity_type,
587
- entity_id=entity_id,
588
- )
582
+ api = context.client.build_api(
583
+ ApiCategories.CONTEXT.value,
584
+ op,
585
+ project=context.name,
586
+ entity_type=entity_type,
587
+ entity_id=entity_id,
588
+ )
589
589
  return context.client.delete_object(api, **kwargs)
590
590
 
591
591
  def delete_context_entity(
@@ -7,8 +7,8 @@ from __future__ import annotations
7
7
  import typing
8
8
  from typing import Any
9
9
 
10
- from digitalhub.entities._commons.enums import ApiCategories, BackendOperations
11
10
  from digitalhub.entities._processors.utils import get_context_from_project
11
+ from digitalhub.stores.client._base.enums import ApiCategories, BackendOperations
12
12
 
13
13
  if typing.TYPE_CHECKING:
14
14
  from digitalhub.entities._base.context.entity import ContextEntity
@@ -7,9 +7,10 @@ from __future__ import annotations
7
7
  import typing
8
8
 
9
9
  from digitalhub.context.api import get_context
10
- from digitalhub.entities._commons.enums import ApiCategories, BackendOperations, EntityTypes
10
+ from digitalhub.entities._commons.enums import EntityTypes
11
11
  from digitalhub.entities._commons.utils import get_project_from_key, is_valid_key, parse_entity_key
12
12
  from digitalhub.factory.entity import entity_factory
13
+ from digitalhub.stores.client._base.enums import ApiCategories, BackendOperations
13
14
  from digitalhub.stores.client.api import get_client
14
15
  from digitalhub.utils.exceptions import ContextError, EntityError, EntityNotExistsError
15
16
 
@@ -132,7 +132,6 @@ def get_artifact(
132
132
  identifier: str,
133
133
  project: str | None = None,
134
134
  entity_id: str | None = None,
135
- **kwargs,
136
135
  ) -> Artifact:
137
136
  """
138
137
  Get object from backend.
@@ -145,8 +144,6 @@ def get_artifact(
145
144
  Project name.
146
145
  entity_id : str
147
146
  Entity ID.
148
- **kwargs : dict
149
- Parameters to pass to the API call.
150
147
 
151
148
  Returns
152
149
  -------
@@ -168,14 +165,12 @@ def get_artifact(
168
165
  entity_type=ENTITY_TYPE,
169
166
  project=project,
170
167
  entity_id=entity_id,
171
- **kwargs,
172
168
  )
173
169
 
174
170
 
175
171
  def get_artifact_versions(
176
172
  identifier: str,
177
173
  project: str | None = None,
178
- **kwargs,
179
174
  ) -> list[Artifact]:
180
175
  """
181
176
  Get object versions from backend.
@@ -186,8 +181,6 @@ def get_artifact_versions(
186
181
  Entity key (store://...) or entity name.
187
182
  project : str
188
183
  Project name.
189
- **kwargs : dict
190
- Parameters to pass to the API call.
191
184
 
192
185
  Returns
193
186
  -------
@@ -207,11 +200,20 @@ def get_artifact_versions(
207
200
  identifier=identifier,
208
201
  entity_type=ENTITY_TYPE,
209
202
  project=project,
210
- **kwargs,
211
203
  )
212
204
 
213
205
 
214
- def list_artifacts(project: str, **kwargs) -> list[Artifact]:
206
+ def list_artifacts(
207
+ project: str,
208
+ q: str | None = None,
209
+ name: str | None = None,
210
+ kind: str | None = None,
211
+ user: str | None = None,
212
+ state: str | None = None,
213
+ created: str | None = None,
214
+ updated: str | None = None,
215
+ version: str | None = None,
216
+ ) -> list[Artifact]:
215
217
  """
216
218
  List all latest version objects from backend.
217
219
 
@@ -219,8 +221,22 @@ def list_artifacts(project: str, **kwargs) -> list[Artifact]:
219
221
  ----------
220
222
  project : str
221
223
  Project name.
222
- **kwargs : dict
223
- Parameters to pass to the API call.
224
+ q : str
225
+ Query string to filter objects.
226
+ name : str
227
+ Object name.
228
+ kind : str
229
+ Kind of the object.
230
+ user : str
231
+ User that created the object.
232
+ state : str
233
+ Object state.
234
+ created : str
235
+ Creation date filter.
236
+ updated : str
237
+ Update date filter.
238
+ version : str
239
+ Object version, default is latest.
224
240
 
225
241
  Returns
226
242
  -------
@@ -234,7 +250,14 @@ def list_artifacts(project: str, **kwargs) -> list[Artifact]:
234
250
  return context_processor.list_context_entities(
235
251
  project=project,
236
252
  entity_type=ENTITY_TYPE,
237
- **kwargs,
253
+ q=q,
254
+ name=name,
255
+ kind=kind,
256
+ user=user,
257
+ state=state,
258
+ created=created,
259
+ updated=updated,
260
+ version=version,
238
261
  )
239
262
 
240
263
 
@@ -328,7 +351,6 @@ def delete_artifact(
328
351
  entity_id: str | None = None,
329
352
  delete_all_versions: bool = False,
330
353
  cascade: bool = True,
331
- **kwargs,
332
354
  ) -> dict:
333
355
  """
334
356
  Delete object from backend.
@@ -342,11 +364,10 @@ def delete_artifact(
342
364
  entity_id : str
343
365
  Entity ID.
344
366
  delete_all_versions : bool
345
- Delete all versions of the named entity. If True, use entity name instead of entity key as identifier.
367
+ Delete all versions of the named entity.
368
+ If True, use entity name instead of entity key as identifier.
346
369
  cascade : bool
347
370
  Cascade delete.
348
- **kwargs : dict
349
- Parameters to pass to the API call.
350
371
 
351
372
  Returns
352
373
  -------
@@ -370,5 +391,4 @@ def delete_artifact(
370
391
  entity_id=entity_id,
371
392
  delete_all_versions=delete_all_versions,
372
393
  cascade=cascade,
373
- **kwargs,
374
394
  )
@@ -161,7 +161,6 @@ def get_dataitem(
161
161
  identifier: str,
162
162
  project: str | None = None,
163
163
  entity_id: str | None = None,
164
- **kwargs,
165
164
  ) -> Dataitem:
166
165
  """
167
166
  Get object from backend.
@@ -174,8 +173,6 @@ def get_dataitem(
174
173
  Project name.
175
174
  entity_id : str
176
175
  Entity ID.
177
- **kwargs : dict
178
- Parameters to pass to the API call.
179
176
 
180
177
  Returns
181
178
  -------
@@ -197,14 +194,12 @@ def get_dataitem(
197
194
  entity_type=ENTITY_TYPE,
198
195
  project=project,
199
196
  entity_id=entity_id,
200
- **kwargs,
201
197
  )
202
198
 
203
199
 
204
200
  def get_dataitem_versions(
205
201
  identifier: str,
206
202
  project: str | None = None,
207
- **kwargs,
208
203
  ) -> list[Dataitem]:
209
204
  """
210
205
  Get object versions from backend.
@@ -215,8 +210,6 @@ def get_dataitem_versions(
215
210
  Entity key (store://...) or entity name.
216
211
  project : str
217
212
  Project name.
218
- **kwargs : dict
219
- Parameters to pass to the API call.
220
213
 
221
214
  Returns
222
215
  -------
@@ -236,11 +229,20 @@ def get_dataitem_versions(
236
229
  identifier=identifier,
237
230
  entity_type=ENTITY_TYPE,
238
231
  project=project,
239
- **kwargs,
240
232
  )
241
233
 
242
234
 
243
- def list_dataitems(project: str, **kwargs) -> list[Dataitem]:
235
+ def list_dataitems(
236
+ project: str,
237
+ q: str | None = None,
238
+ name: str | None = None,
239
+ kind: str | None = None,
240
+ user: str | None = None,
241
+ state: str | None = None,
242
+ created: str | None = None,
243
+ updated: str | None = None,
244
+ version: str | None = None,
245
+ ) -> list[Dataitem]:
244
246
  """
245
247
  List all latest version objects from backend.
246
248
 
@@ -248,8 +250,22 @@ def list_dataitems(project: str, **kwargs) -> list[Dataitem]:
248
250
  ----------
249
251
  project : str
250
252
  Project name.
251
- **kwargs : dict
252
- Parameters to pass to the API call.
253
+ q : str
254
+ Query string to filter objects.
255
+ name : str
256
+ Object name.
257
+ kind : str
258
+ Kind of the object.
259
+ user : str
260
+ User that created the object.
261
+ state : str
262
+ Object state.
263
+ created : str
264
+ Creation date filter.
265
+ updated : str
266
+ Update date filter.
267
+ version : str
268
+ Object version, default is latest.
253
269
 
254
270
  Returns
255
271
  -------
@@ -263,7 +279,14 @@ def list_dataitems(project: str, **kwargs) -> list[Dataitem]:
263
279
  return context_processor.list_context_entities(
264
280
  project=project,
265
281
  entity_type=ENTITY_TYPE,
266
- **kwargs,
282
+ q=q,
283
+ name=name,
284
+ kind=kind,
285
+ user=user,
286
+ state=state,
287
+ created=created,
288
+ updated=updated,
289
+ version=version,
267
290
  )
268
291
 
269
292
 
@@ -371,7 +394,8 @@ def delete_dataitem(
371
394
  entity_id : str
372
395
  Entity ID.
373
396
  delete_all_versions : bool
374
- Delete all versions of the named entity. If True, use entity name instead of entity key as identifier.
397
+ Delete all versions of the named entity.
398
+ If True, use entity name instead of entity key as identifier.
375
399
  cascade : bool
376
400
  Cascade delete.
377
401
  **kwargs : dict
@@ -7,6 +7,7 @@ from __future__ import annotations
7
7
  import typing
8
8
  from typing import Any
9
9
 
10
+ from digitalhub.entities._base.material.utils import refresh_decorator
10
11
  from digitalhub.entities.dataitem._base.entity import Dataitem
11
12
  from digitalhub.stores.data.api import get_store
12
13
  from digitalhub.utils.uri_utils import has_sql_scheme
@@ -63,6 +64,7 @@ class DataitemTable(Dataitem):
63
64
  self._query = query
64
65
  return self
65
66
 
67
+ @refresh_decorator
66
68
  def as_df(
67
69
  self,
68
70
  file_format: str | None = None,
@@ -105,6 +107,7 @@ class DataitemTable(Dataitem):
105
107
  **kwargs,
106
108
  )
107
109
 
110
+ @refresh_decorator
108
111
  def write_df(
109
112
  self,
110
113
  df: Any,
@@ -76,7 +76,6 @@ def get_function(
76
76
  identifier: str,
77
77
  project: str | None = None,
78
78
  entity_id: str | None = None,
79
- **kwargs,
80
79
  ) -> Function:
81
80
  """
82
81
  Get object from backend.
@@ -89,8 +88,6 @@ def get_function(
89
88
  Project name.
90
89
  entity_id : str
91
90
  Entity ID.
92
- **kwargs : dict
93
- Parameters to pass to the API call.
94
91
 
95
92
  Returns
96
93
  -------
@@ -108,18 +105,16 @@ def get_function(
108
105
  >>> entity_id="my-function-id")
109
106
  """
110
107
  return context_processor.read_context_entity(
111
- identifier,
108
+ identifier=identifier,
112
109
  entity_type=ENTITY_TYPE,
113
110
  project=project,
114
111
  entity_id=entity_id,
115
- **kwargs,
116
112
  )
117
113
 
118
114
 
119
115
  def get_function_versions(
120
116
  identifier: str,
121
117
  project: str | None = None,
122
- **kwargs,
123
118
  ) -> list[Function]:
124
119
  """
125
120
  Get object versions from backend.
@@ -130,8 +125,6 @@ def get_function_versions(
130
125
  Entity key (store://...) or entity name.
131
126
  project : str
132
127
  Project name.
133
- **kwargs : dict
134
- Parameters to pass to the API call.
135
128
 
136
129
  Returns
137
130
  -------
@@ -148,14 +141,23 @@ def get_function_versions(
148
141
  >>> project="my-project")
149
142
  """
150
143
  return context_processor.read_context_entity_versions(
151
- identifier,
144
+ identifier=identifier,
152
145
  entity_type=ENTITY_TYPE,
153
146
  project=project,
154
- **kwargs,
155
147
  )
156
148
 
157
149
 
158
- def list_functions(project: str, **kwargs) -> list[Function]:
150
+ def list_functions(
151
+ project: str,
152
+ q: str | None = None,
153
+ name: str | None = None,
154
+ kind: str | None = None,
155
+ user: str | None = None,
156
+ state: str | None = None,
157
+ created: str | None = None,
158
+ updated: str | None = None,
159
+ version: str | None = None,
160
+ ) -> list[Function]:
159
161
  """
160
162
  List all latest version objects from backend.
161
163
 
@@ -163,8 +165,22 @@ def list_functions(project: str, **kwargs) -> list[Function]:
163
165
  ----------
164
166
  project : str
165
167
  Project name.
166
- **kwargs : dict
167
- Parameters to pass to the API call.
168
+ q : str
169
+ Query string to filter objects.
170
+ name : str
171
+ Object name.
172
+ kind : str
173
+ Kind of the object.
174
+ user : str
175
+ User that created the object.
176
+ state : str
177
+ Object state.
178
+ created : str
179
+ Creation date filter.
180
+ updated : str
181
+ Update date filter.
182
+ version : str
183
+ Object version, default is latest.
168
184
 
169
185
  Returns
170
186
  -------
@@ -178,7 +194,14 @@ def list_functions(project: str, **kwargs) -> list[Function]:
178
194
  return context_processor.list_context_entities(
179
195
  project=project,
180
196
  entity_type=ENTITY_TYPE,
181
- **kwargs,
197
+ q=q,
198
+ name=name,
199
+ kind=kind,
200
+ user=user,
201
+ state=state,
202
+ created=created,
203
+ updated=updated,
204
+ version=version,
182
205
  )
183
206
 
184
207
 
@@ -267,7 +290,6 @@ def delete_function(
267
290
  entity_id: str | None = None,
268
291
  delete_all_versions: bool = False,
269
292
  cascade: bool = True,
270
- **kwargs,
271
293
  ) -> dict:
272
294
  """
273
295
  Delete object from backend.
@@ -281,11 +303,10 @@ def delete_function(
281
303
  entity_id : str
282
304
  Entity ID.
283
305
  delete_all_versions : bool
284
- Delete all versions of the named entity. If True, use entity name instead of entity key as identifier.
306
+ Delete all versions of the named entity.
307
+ If True, use entity name instead of entity key as identifier.
285
308
  cascade : bool
286
309
  Cascade delete.
287
- **kwargs : dict
288
- Parameters to pass to the API call.
289
310
 
290
311
  Returns
291
312
  -------
@@ -309,5 +330,4 @@ def delete_function(
309
330
  entity_id=entity_id,
310
331
  delete_all_versions=delete_all_versions,
311
332
  cascade=cascade,
312
- **kwargs,
313
333
  )
@@ -131,7 +131,6 @@ def get_model(
131
131
  identifier: str,
132
132
  project: str | None = None,
133
133
  entity_id: str | None = None,
134
- **kwargs,
135
134
  ) -> Model:
136
135
  """
137
136
  Get object from backend.
@@ -144,8 +143,6 @@ def get_model(
144
143
  Project name.
145
144
  entity_id : str
146
145
  Entity ID.
147
- **kwargs : dict
148
- Parameters to pass to the API call.
149
146
 
150
147
  Returns
151
148
  -------
@@ -167,14 +164,12 @@ def get_model(
167
164
  entity_type=ENTITY_TYPE,
168
165
  project=project,
169
166
  entity_id=entity_id,
170
- **kwargs,
171
167
  )
172
168
 
173
169
 
174
170
  def get_model_versions(
175
171
  identifier: str,
176
172
  project: str | None = None,
177
- **kwargs,
178
173
  ) -> list[Model]:
179
174
  """
180
175
  Get object versions from backend.
@@ -185,8 +180,6 @@ def get_model_versions(
185
180
  Entity key (store://...) or entity name.
186
181
  project : str
187
182
  Project name.
188
- **kwargs : dict
189
- Parameters to pass to the API call.
190
183
 
191
184
  Returns
192
185
  -------
@@ -206,11 +199,20 @@ def get_model_versions(
206
199
  identifier=identifier,
207
200
  entity_type=ENTITY_TYPE,
208
201
  project=project,
209
- **kwargs,
210
202
  )
211
203
 
212
204
 
213
- def list_models(project: str, **kwargs) -> list[Model]:
205
+ def list_models(
206
+ project: str,
207
+ q: str | None = None,
208
+ name: str | None = None,
209
+ kind: str | None = None,
210
+ user: str | None = None,
211
+ state: str | None = None,
212
+ created: str | None = None,
213
+ updated: str | None = None,
214
+ version: str | None = None,
215
+ ) -> list[Model]:
214
216
  """
215
217
  List all latest version objects from backend.
216
218
 
@@ -218,8 +220,22 @@ def list_models(project: str, **kwargs) -> list[Model]:
218
220
  ----------
219
221
  project : str
220
222
  Project name.
221
- **kwargs : dict
222
- Parameters to pass to the API call.
223
+ q : str
224
+ Query string to filter objects.
225
+ name : str
226
+ Object name.
227
+ kind : str
228
+ Kind of the object.
229
+ user : str
230
+ User that created the object.
231
+ state : str
232
+ Object state.
233
+ created : str
234
+ Creation date filter.
235
+ updated : str
236
+ Update date filter.
237
+ version : str
238
+ Object version, default is latest.
223
239
 
224
240
  Returns
225
241
  -------
@@ -233,7 +249,14 @@ def list_models(project: str, **kwargs) -> list[Model]:
233
249
  return context_processor.list_context_entities(
234
250
  project=project,
235
251
  entity_type=ENTITY_TYPE,
236
- **kwargs,
252
+ q=q,
253
+ name=name,
254
+ kind=kind,
255
+ user=user,
256
+ state=state,
257
+ created=created,
258
+ updated=updated,
259
+ version=version,
237
260
  )
238
261
 
239
262
 
@@ -327,7 +350,6 @@ def delete_model(
327
350
  entity_id: str | None = None,
328
351
  delete_all_versions: bool = False,
329
352
  cascade: bool = True,
330
- **kwargs,
331
353
  ) -> dict:
332
354
  """
333
355
  Delete object from backend.
@@ -341,11 +363,10 @@ def delete_model(
341
363
  entity_id : str
342
364
  Entity ID.
343
365
  delete_all_versions : bool
344
- Delete all versions of the named entity. If True, use entity name instead of entity key as identifier.
366
+ Delete all versions of the named entity.
367
+ If True, use entity name instead of entity key as identifier.
345
368
  cascade : bool
346
369
  Cascade delete.
347
- **kwargs : dict
348
- Parameters to pass to the API call.
349
370
 
350
371
  Returns
351
372
  -------
@@ -369,5 +390,4 @@ def delete_model(
369
390
  entity_id=entity_id,
370
391
  delete_all_versions=delete_all_versions,
371
392
  cascade=cascade,
372
- **kwargs,
373
393
  )
@@ -2120,7 +2120,7 @@ class Project(Entity):
2120
2120
  def delete_run(
2121
2121
  self,
2122
2122
  identifier: str,
2123
- **kwargs,
2123
+ entity_id: str,
2124
2124
  ) -> None:
2125
2125
  """
2126
2126
  Delete run from backend.
@@ -2128,9 +2128,9 @@ class Project(Entity):
2128
2128
  Parameters
2129
2129
  ----------
2130
2130
  identifier : str
2131
- Entity key (store://...) or entity ID.
2132
- **kwargs : dict
2133
- Parameters to pass to the API call.
2131
+ Entity key (store://...) or entity name.
2132
+ entity_id : str
2133
+ Entity ID.
2134
2134
 
2135
2135
  Returns
2136
2136
  -------
@@ -2145,7 +2145,7 @@ class Project(Entity):
2145
2145
  delete_run(
2146
2146
  identifier=identifier,
2147
2147
  project=self.name,
2148
- **kwargs,
2148
+ entity_id=entity_id,
2149
2149
  )
2150
2150
  self.refresh()
2151
2151