digitalhub 0.10.3__py3-none-any.whl → 0.11.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 (68) hide show
  1. digitalhub/__init__.py +10 -0
  2. digitalhub/context/api.py +10 -4
  3. digitalhub/context/builder.py +35 -20
  4. digitalhub/context/context.py +35 -24
  5. digitalhub/entities/_base/entity/builder.py +11 -0
  6. digitalhub/entities/_base/executable/entity.py +52 -5
  7. digitalhub/entities/_base/material/utils.py +11 -11
  8. digitalhub/entities/_commons/enums.py +4 -0
  9. digitalhub/entities/_processors/base.py +15 -15
  10. digitalhub/entities/_processors/context.py +62 -15
  11. digitalhub/entities/_processors/utils.py +2 -2
  12. digitalhub/entities/builders.py +2 -0
  13. digitalhub/entities/function/_base/entity.py +3 -3
  14. digitalhub/entities/project/_base/builder.py +4 -0
  15. digitalhub/entities/project/_base/entity.py +5 -2
  16. digitalhub/entities/project/_base/models.py +18 -0
  17. digitalhub/entities/project/_base/spec.py +6 -0
  18. digitalhub/entities/project/crud.py +2 -13
  19. digitalhub/entities/run/_base/entity.py +6 -12
  20. digitalhub/entities/task/_base/entity.py +4 -4
  21. digitalhub/entities/task/_base/models.py +20 -2
  22. digitalhub/entities/trigger/__init__.py +0 -0
  23. digitalhub/entities/trigger/_base/__init__.py +0 -0
  24. digitalhub/entities/trigger/_base/builder.py +70 -0
  25. digitalhub/entities/trigger/_base/entity.py +34 -0
  26. digitalhub/entities/trigger/_base/spec.py +40 -0
  27. digitalhub/entities/trigger/_base/status.py +9 -0
  28. digitalhub/entities/trigger/crud.py +309 -0
  29. digitalhub/entities/trigger/lifecycle/__init__.py +0 -0
  30. digitalhub/entities/trigger/lifecycle/builder.py +19 -0
  31. digitalhub/entities/trigger/lifecycle/entity.py +32 -0
  32. digitalhub/entities/trigger/lifecycle/spec.py +38 -0
  33. digitalhub/entities/trigger/lifecycle/status.py +9 -0
  34. digitalhub/entities/trigger/scheduler/__init__.py +0 -0
  35. digitalhub/entities/trigger/scheduler/builder.py +19 -0
  36. digitalhub/entities/trigger/scheduler/entity.py +32 -0
  37. digitalhub/entities/trigger/scheduler/spec.py +29 -0
  38. digitalhub/entities/trigger/scheduler/status.py +9 -0
  39. digitalhub/entities/workflow/_base/entity.py +3 -3
  40. digitalhub/factory/factory.py +113 -26
  41. digitalhub/factory/utils.py +31 -14
  42. digitalhub/runtimes/_base.py +22 -11
  43. digitalhub/runtimes/builder.py +16 -3
  44. digitalhub/runtimes/enums.py +11 -1
  45. digitalhub/stores/client/api.py +1 -1
  46. digitalhub/stores/client/builder.py +2 -2
  47. digitalhub/stores/client/dhcore/client.py +2 -2
  48. digitalhub/stores/client/dhcore/configurator.py +10 -4
  49. digitalhub/stores/configurator/configurator.py +2 -1
  50. digitalhub/stores/configurator/enums.py +9 -0
  51. digitalhub/stores/data/api.py +2 -2
  52. digitalhub/stores/data/builder.py +4 -5
  53. digitalhub/stores/data/enums.py +11 -0
  54. digitalhub/stores/data/s3/configurator.py +0 -1
  55. digitalhub/stores/data/s3/enums.py +2 -3
  56. digitalhub/stores/data/s3/store.py +2 -3
  57. digitalhub/stores/data/s3/utils.py +13 -18
  58. digitalhub/stores/data/sql/configurator.py +3 -3
  59. digitalhub/stores/data/sql/store.py +0 -1
  60. digitalhub/stores/data/utils.py +34 -0
  61. digitalhub/utils/file_utils.py +1 -1
  62. digitalhub/utils/generic_utils.py +37 -0
  63. digitalhub/utils/uri_utils.py +5 -0
  64. {digitalhub-0.10.3.dist-info → digitalhub-0.11.0.dist-info}/METADATA +1 -1
  65. {digitalhub-0.10.3.dist-info → digitalhub-0.11.0.dist-info}/RECORD +67 -48
  66. digitalhub/factory/api.py +0 -277
  67. {digitalhub-0.10.3.dist-info → digitalhub-0.11.0.dist-info}/WHEEL +0 -0
  68. {digitalhub-0.10.3.dist-info → digitalhub-0.11.0.dist-info}/licenses/LICENSE.txt +0 -0
digitalhub/__init__.py CHANGED
@@ -72,6 +72,16 @@ from digitalhub.entities.task.crud import (
72
72
  new_task,
73
73
  update_task,
74
74
  )
75
+ from digitalhub.entities.trigger.crud import (
76
+ delete_trigger,
77
+ get_trigger,
78
+ get_trigger_versions,
79
+ import_trigger,
80
+ list_triggers,
81
+ load_trigger,
82
+ new_trigger,
83
+ update_trigger,
84
+ )
75
85
  from digitalhub.entities.workflow.crud import (
76
86
  delete_workflow,
77
87
  get_workflow,
digitalhub/context/api.py CHANGED
@@ -9,20 +9,26 @@ if typing.TYPE_CHECKING:
9
9
  from digitalhub.entities.project._base.entity import Project
10
10
 
11
11
 
12
- def build_context(project: Project, overwrite: bool = False) -> None:
12
+ def build_context(project: Project, overwrite: bool = False) -> Context:
13
13
  """
14
- Wrapper for ContextBuilder.build().
14
+ Build a new context for a project.
15
+
16
+ Creates or updates a context instance for the given project in the global
17
+ context registry.
15
18
 
16
19
  Parameters
17
20
  ----------
18
21
  project : Project
19
22
  The project object used to build the context.
23
+ overwrite : bool, optional
24
+ If True, overwrites existing context if it exists, by default False.
20
25
 
21
26
  Returns
22
27
  -------
23
- None
28
+ Context
29
+ The newly created or existing context instance.
24
30
  """
25
- context_builder.build(project, overwrite)
31
+ return context_builder.build(project, overwrite)
26
32
 
27
33
 
28
34
  def get_context(project: str) -> Context:
@@ -11,51 +11,60 @@ if typing.TYPE_CHECKING:
11
11
 
12
12
  class ContextBuilder:
13
13
  """
14
- ContextBuilder class.
15
- It implements the builder pattern to create a context instance.
16
- It allows to use multiple projects as context at the same time
17
- by adding them to the _instances registry with their name.
14
+ A builder class for managing project contexts.
15
+
16
+ This class implements the builder pattern to create and manage Context instances.
17
+ It maintains a registry of project contexts, allowing multiple projects to be
18
+ used simultaneously by storing them with their respective names.
19
+
20
+ Attributes
21
+ ----------
22
+ _instances : dict[str, Context]
23
+ Internal registry mapping project names to their Context instances.
18
24
  """
19
25
 
20
26
  def __init__(self) -> None:
21
27
  self._instances: dict[str, Context] = {}
22
28
 
23
- def build(self, project_object: Project, overwrite: bool = False) -> None:
29
+ def build(self, project: Project, overwrite: bool = False) -> Context:
24
30
  """
25
- Add a project as context.
31
+ Add a project as context and return the created Context instance.
26
32
 
27
33
  Parameters
28
34
  ----------
29
- project_object : Project
30
- The project to add.
31
- overwrite : bool
32
- If True, the project will be overwritten if it already exists.
35
+ project : Project
36
+ The project instance to create a context for.
37
+ overwrite : bool, optional
38
+ If True, overwrites existing context if project name already exists,
39
+ by default False.
33
40
 
34
41
  Returns
35
42
  -------
36
- None
43
+ Context
44
+ The newly created or existing Context instance.
37
45
  """
38
- if (project_object.name not in self._instances) or overwrite:
39
- self._instances[project_object.name] = Context(project_object)
46
+ if (project.name not in self._instances) or overwrite:
47
+ self._instances[project.name] = Context(project)
48
+ return self._instances[project.name]
40
49
 
41
50
  def get(self, project: str) -> Context:
42
51
  """
43
- Get a context from project name if it exists.
52
+ Retrieve a context instance by project name.
44
53
 
45
54
  Parameters
46
55
  ----------
47
56
  project : str
48
- The project name.
57
+ The name of the project whose context to retrieve.
49
58
 
50
59
  Returns
51
60
  -------
52
61
  Context
53
- The project context.
62
+ The context instance associated with the project.
54
63
 
55
64
  Raises
56
65
  ------
57
- ValueError
58
- If the project is not in the context.
66
+ ContextError
67
+ If no context exists for the specified project name.
59
68
  """
60
69
  try:
61
70
  return self._instances[project]
@@ -64,16 +73,22 @@ class ContextBuilder:
64
73
 
65
74
  def remove(self, project: str) -> None:
66
75
  """
67
- Remove a project from the context.
76
+ Remove a project's context from the registry.
68
77
 
69
78
  Parameters
70
79
  ----------
71
80
  project : str
72
- The project name.
81
+ The name of the project whose context should be removed.
73
82
 
74
83
  Returns
75
84
  -------
76
85
  None
86
+ This method doesn't return anything.
87
+
88
+ Notes
89
+ -----
90
+ If the project doesn't exist in the registry, this method
91
+ silently does nothing.
77
92
  """
78
93
  self._instances.pop(project, None)
79
94
 
@@ -5,60 +5,71 @@ from pathlib import Path
5
5
 
6
6
  if typing.TYPE_CHECKING:
7
7
  from digitalhub.entities.project._base.entity import Project
8
+ from digitalhub.stores.client._base.client import Client
8
9
 
9
10
 
10
11
  class Context:
11
12
  """
12
- Context class built forom a `Project` instance. It contains
13
- some information about the project, such as the project name,
14
- a client instance (local or non-local), the local context
15
- project path and information about client locality.
13
+ Context class built from a Project instance.
14
+
15
+ Contains project-specific information and state, including project name,
16
+ client instance, local context paths, and run-time information.
17
+
18
+ Attributes
19
+ ----------
20
+ name : str
21
+ The name of the project.
22
+ client : BaseClient
23
+ The client instance (local or remote) associated with the project.
24
+ config : dict
25
+ Project configuration profile.
26
+ local : bool
27
+ Whether the client is local or remote.
28
+ root : Path
29
+ The local context project path.
30
+ is_running : bool
31
+ Flag indicating if the context has an active run.
32
+ _run_ctx : str | None
33
+ Current run key, if any.
16
34
  """
17
35
 
18
36
  def __init__(self, project: Project) -> None:
19
- self.name = project.name
20
- self.client = project._client
21
- self.local = project._client.is_local()
22
- self.root = Path(project.spec.context)
37
+ self.name: str = project.name
38
+ self.client: Client = project._client
39
+ self.config: dict = project.spec.config
40
+ self.local: bool = project._client.is_local()
41
+ self.root: Path = Path(project.spec.context)
23
42
  self.root.mkdir(parents=True, exist_ok=True)
24
43
 
25
44
  self.is_running: bool = False
26
- self._run_ctx: str = None
45
+ self._run_ctx: str | None = None
27
46
 
28
47
  def set_run(self, run_ctx: str) -> None:
29
48
  """
30
- Set run identifier.
49
+ Set the current run key.
31
50
 
32
51
  Parameters
33
52
  ----------
34
53
  run_ctx : str
35
- Run key.
36
-
37
- Returns
38
- -------
39
- None
54
+ The run key to set.
40
55
  """
41
56
  self.is_running = True
42
57
  self._run_ctx = run_ctx
43
58
 
44
59
  def unset_run(self) -> None:
45
60
  """
46
- Unset run identifier.
47
-
48
- Returns
49
- -------
50
- None
61
+ Clear the current run key and reset running state.
51
62
  """
52
63
  self.is_running = False
53
64
  self._run_ctx = None
54
65
 
55
- def get_run_ctx(self) -> str:
66
+ def get_run_ctx(self) -> str | None:
56
67
  """
57
- Get run identifier.
68
+ Get the current run key.
58
69
 
59
70
  Returns
60
71
  -------
61
- str
62
- Run key.
72
+ str | None
73
+ The current run key if set, None otherwise.
63
74
  """
64
75
  return self._run_ctx
@@ -178,3 +178,14 @@ class EntityBuilder:
178
178
  Entity kind.
179
179
  """
180
180
  return self.ENTITY_KIND
181
+
182
+ def get_spec_validator(self) -> type[SpecValidator]:
183
+ """
184
+ Get entity spec validator.
185
+
186
+ Returns
187
+ -------
188
+ type[SpecValidator]
189
+ Entity spec validator.
190
+ """
191
+ return self.ENTITY_SPEC_VALIDATOR
@@ -7,15 +7,16 @@ from digitalhub.entities._commons.enums import EntityTypes
7
7
  from digitalhub.entities._processors.context import context_processor
8
8
  from digitalhub.entities.run.crud import delete_run, get_run, list_runs
9
9
  from digitalhub.entities.task.crud import delete_task
10
- from digitalhub.factory.api import build_entity_from_dict, build_entity_from_params
10
+ from digitalhub.factory.factory import factory
11
11
  from digitalhub.utils.exceptions import EntityAlreadyExistsError, EntityError
12
12
 
13
13
  if typing.TYPE_CHECKING:
14
14
  from digitalhub.entities._base.entity.metadata import Metadata
15
- from digitalhub.entities._base.entity.spec import Spec
15
+ from digitalhub.entities._base.entity.spec import Spec, SpecValidator
16
16
  from digitalhub.entities._base.entity.status import Status
17
17
  from digitalhub.entities.run._base.entity import Run
18
18
  from digitalhub.entities.task._base.entity import Task
19
+ from digitalhub.entities.trigger._base.entity import Trigger
19
20
 
20
21
 
21
22
  class ExecutableEntity(VersionedEntity):
@@ -102,7 +103,7 @@ class ExecutableEntity(VersionedEntity):
102
103
  # Create a new object from dictionary.
103
104
  # the form in which tasks are stored in function
104
105
  # status
105
- task_obj = build_entity_from_dict(task)
106
+ task_obj: Task = factory.build_entity_from_dict(task)
106
107
 
107
108
  # Try to save it in backend to been able to use
108
109
  # it for launching runs. In fact, tasks must be
@@ -145,7 +146,7 @@ class ExecutableEntity(VersionedEntity):
145
146
  kwargs["kind"] = task_kind
146
147
 
147
148
  # Create object instance
148
- task = build_entity_from_params(**kwargs)
149
+ task: Task = factory.build_entity_from_params(**kwargs)
149
150
  task.save()
150
151
 
151
152
  self._tasks[task_kind] = task
@@ -207,7 +208,7 @@ class ExecutableEntity(VersionedEntity):
207
208
  kwargs["uuid"] = self._tasks[kind].id
208
209
 
209
210
  # Update task
210
- task = build_entity_from_params(**kwargs)
211
+ task: Task = factory.build_entity_from_params(**kwargs)
211
212
  task.save(update=True)
212
213
  self._tasks[kind] = task
213
214
  return task
@@ -403,3 +404,49 @@ class ExecutableEntity(VersionedEntity):
403
404
  project=self.project,
404
405
  **kwargs,
405
406
  )
407
+
408
+ ##############################
409
+ # Trigger
410
+ ##############################
411
+
412
+ def trigger(self, action: str, trigger_kind: str, trigger_name: str, **kwargs) -> Trigger:
413
+ """
414
+ Trigger function.
415
+
416
+ Parameters
417
+ ----------
418
+ action : str
419
+ Action to execute.
420
+ trigger_kind : str
421
+ Trigger kind.
422
+ **kwargs : dict
423
+ Keyword arguments passed to Run builder.
424
+
425
+ Returns
426
+ -------
427
+ Run
428
+ Run instance.
429
+ """
430
+ # Get task
431
+ task_kind = factory.get_task_kind_from_action(self.kind, action)
432
+ task = self._get_or_create_task(task_kind)
433
+ task_string = task._get_task_string()
434
+
435
+ # Get run validator for building trigger template
436
+ run_kind = factory.get_run_kind(self.kind)
437
+ run_validator: SpecValidator = factory.get_spec_validator(run_kind)
438
+ if kwargs is None:
439
+ kwargs = {}
440
+
441
+ # Override kwargs
442
+ kwargs["project"] = self.project
443
+ kwargs["kind"] = trigger_kind
444
+ kwargs["name"] = trigger_name
445
+ kwargs[self.ENTITY_TYPE] = self._get_executable_string()
446
+ kwargs["task"] = task_string
447
+ kwargs["template"] = run_validator(**kwargs).to_dict()
448
+
449
+ # Create object instance
450
+ trigger: Trigger = factory.build_entity_from_params(**kwargs)
451
+ trigger.save()
452
+ return trigger
@@ -2,9 +2,9 @@ from __future__ import annotations
2
2
 
3
3
  from pathlib import Path
4
4
 
5
- from digitalhub.stores.data.s3.utils import get_s3_bucket_from_env
5
+ from digitalhub.stores.data.utils import get_default_store
6
6
  from digitalhub.utils.file_utils import eval_zip_type
7
- from digitalhub.utils.uri_utils import S3Schemes, has_local_scheme
7
+ from digitalhub.utils.uri_utils import has_local_scheme
8
8
 
9
9
 
10
10
  def eval_local_source(source: str | list[str]) -> None:
@@ -34,7 +34,7 @@ def eval_local_source(source: str | list[str]) -> None:
34
34
  raise ValueError("Invalid source path. Source must be a local path.")
35
35
 
36
36
 
37
- def eval_zip_sources(source: str | list[str]) -> str:
37
+ def eval_zip_sources(source: str | list[str]) -> bool:
38
38
  """
39
39
  Evaluate zip sources.
40
40
 
@@ -45,21 +45,21 @@ def eval_zip_sources(source: str | list[str]) -> str:
45
45
 
46
46
  Returns
47
47
  -------
48
- str
49
- S3Schemes.
48
+ bool
49
+ True if source is zip.
50
50
  """
51
51
  if isinstance(source, list):
52
52
  if len(source) > 1:
53
- return S3Schemes.S3.value
53
+ return False
54
54
  path = source[0]
55
55
  else:
56
56
  if Path(source).is_dir():
57
- return S3Schemes.S3.value
57
+ return False
58
58
  path = source
59
59
 
60
60
  if not eval_zip_type(path):
61
- return S3Schemes.S3.value
62
- return S3Schemes.ZIP_S3.value
61
+ return False
62
+ return True
63
63
 
64
64
 
65
65
  def build_log_path_from_source(
@@ -90,8 +90,8 @@ def build_log_path_from_source(
90
90
  str
91
91
  Log path.
92
92
  """
93
- scheme = eval_zip_sources(source)
94
- path = f"{scheme}://{get_s3_bucket_from_env()}/{project}/{entity_type}/{name}/{uuid}"
93
+ prefix = "zip+" if eval_zip_sources(source) else ""
94
+ path = f"{prefix}{get_default_store(project)}/{project}/{entity_type}/{name}/{uuid}"
95
95
 
96
96
  if isinstance(source, list) and len(source) >= 1:
97
97
  if len(source) > 1:
@@ -17,6 +17,7 @@ class EntityTypes(Enum):
17
17
  WORKFLOW = "workflow"
18
18
  TASK = "task"
19
19
  RUN = "run"
20
+ TRIGGER = "trigger"
20
21
 
21
22
 
22
23
  class Relationship(Enum):
@@ -55,6 +56,7 @@ class State(Enum):
55
56
  STOPPED = "STOPPED"
56
57
  SUCCESS = "SUCCESS"
57
58
  UNKNOWN = "UNKNOWN"
59
+ UPLOADING = "UPLOADING"
58
60
 
59
61
 
60
62
  class ApiCategories(Enum):
@@ -103,3 +105,5 @@ class EntityKinds(Enum):
103
105
  MODEL_HUGGINGFACE = "huggingface"
104
106
  MODEL_SKLEARN = "sklearn"
105
107
  SECRET_SECRET = "secret"
108
+ TRIGGER_SCHEDULER = "scheduler"
109
+ TRIGGER_LIFECYCLE = "lifecycle"
@@ -4,7 +4,7 @@ import typing
4
4
 
5
5
  from digitalhub.context.api import delete_context
6
6
  from digitalhub.entities._commons.enums import ApiCategories, BackendOperations
7
- from digitalhub.factory.api import build_entity_from_dict, build_entity_from_params
7
+ from digitalhub.factory.factory import factory
8
8
  from digitalhub.stores.client.api import get_client
9
9
  from digitalhub.utils.exceptions import EntityAlreadyExistsError, EntityError, EntityNotExistsError
10
10
  from digitalhub.utils.io_utils import read_yaml
@@ -84,11 +84,11 @@ class BaseEntityOperationsProcessor:
84
84
  client = _entity._client
85
85
  obj = _entity
86
86
  else:
87
- client = get_client(kwargs.get("local"), kwargs.pop("config", None))
88
- obj = build_entity_from_params(**kwargs)
87
+ client = get_client(kwargs.get("local"))
88
+ obj = factory.build_entity_from_params(**kwargs)
89
89
  ent = self._create_base_entity(client, obj.ENTITY_TYPE, obj.to_dict())
90
90
  ent["local"] = client.is_local()
91
- return build_entity_from_dict(ent)
91
+ return factory.build_entity_from_dict(ent)
92
92
 
93
93
  def _read_base_entity(
94
94
  self,
@@ -147,10 +147,10 @@ class BaseEntityOperationsProcessor:
147
147
  Project
148
148
  Object instance.
149
149
  """
150
- client = get_client(kwargs.pop("local", False), kwargs.pop("config", None))
150
+ client = get_client(kwargs.pop("local", False))
151
151
  obj = self._read_base_entity(client, entity_type, entity_name, **kwargs)
152
152
  obj["local"] = client.is_local()
153
- return build_entity_from_dict(obj)
153
+ return factory.build_entity_from_dict(obj)
154
154
 
155
155
  def import_project_entity(
156
156
  self,
@@ -172,11 +172,11 @@ class BaseEntityOperationsProcessor:
172
172
  Project
173
173
  Object instance.
174
174
  """
175
- client = get_client(kwargs.pop("local", False), kwargs.pop("config", None))
175
+ client = get_client(kwargs.pop("local", False))
176
176
  obj: dict = read_yaml(file)
177
177
  obj["status"] = {}
178
178
  obj["local"] = client.is_local()
179
- ent: Project = build_entity_from_dict(obj)
179
+ ent: Project = factory.build_entity_from_dict(obj)
180
180
 
181
181
  try:
182
182
  self._create_base_entity(ent._client, ent.ENTITY_TYPE, ent.to_dict())
@@ -208,10 +208,10 @@ class BaseEntityOperationsProcessor:
208
208
  Project
209
209
  Object instance.
210
210
  """
211
- client = get_client(kwargs.pop("local", False), kwargs.pop("config", None))
211
+ client = get_client(kwargs.pop("local", False))
212
212
  obj: dict = read_yaml(file)
213
213
  obj["local"] = client.is_local()
214
- ent: Project = build_entity_from_dict(obj)
214
+ ent: Project = factory.build_entity_from_dict(obj)
215
215
 
216
216
  try:
217
217
  self._update_base_entity(ent._client, ent.ENTITY_TYPE, ent.name, ent.to_dict())
@@ -278,7 +278,7 @@ class BaseEntityOperationsProcessor:
278
278
  entities = []
279
279
  for obj in objs:
280
280
  obj["local"] = client.is_local()
281
- ent = build_entity_from_dict(obj)
281
+ ent = factory.build_entity_from_dict(obj)
282
282
  entities.append(ent)
283
283
  return entities
284
284
 
@@ -345,10 +345,10 @@ class BaseEntityOperationsProcessor:
345
345
  Project
346
346
  Object instance.
347
347
  """
348
- client = get_client(kwargs.pop("local", False), kwargs.pop("config", None))
348
+ client = get_client(kwargs.pop("local", False))
349
349
  obj = self._update_base_entity(client, entity_type, entity_name, entity_dict, **kwargs)
350
350
  obj["local"] = client.is_local()
351
- return build_entity_from_dict(obj)
351
+ return factory.build_entity_from_dict(obj)
352
352
 
353
353
  def _delete_base_entity(
354
354
  self,
@@ -414,7 +414,7 @@ class BaseEntityOperationsProcessor:
414
414
  """
415
415
  if kwargs.pop("clean_context", True):
416
416
  delete_context(entity_name)
417
- client = get_client(kwargs.pop("local", False), kwargs.pop("config", None))
417
+ client = get_client(kwargs.pop("local", False))
418
418
  return self._delete_base_entity(
419
419
  client,
420
420
  entity_type,
@@ -493,7 +493,7 @@ class BaseEntityOperationsProcessor:
493
493
  -------
494
494
  None
495
495
  """
496
- client = get_client(kwargs.pop("local", False), kwargs.pop("config", None))
496
+ client = get_client(kwargs.pop("local", False))
497
497
  api = client.build_api(
498
498
  ApiCategories.BASE.value,
499
499
  BackendOperations.SHARE.value,