digitalhub 0.11.0b6__py3-none-any.whl → 0.12.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 (265) hide show
  1. digitalhub/__init__.py +3 -0
  2. digitalhub/context/api.py +4 -0
  3. digitalhub/context/builder.py +4 -0
  4. digitalhub/context/context.py +4 -0
  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 +32 -7
  25. digitalhub/entities/_base/material/__init__.py +3 -0
  26. digitalhub/entities/_base/material/entity.py +4 -0
  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 +4 -0
  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 +5 -0
  40. digitalhub/entities/_commons/metrics.py +4 -0
  41. digitalhub/entities/_commons/types.py +4 -0
  42. digitalhub/entities/_commons/utils.py +4 -0
  43. digitalhub/entities/_processors/__init__.py +3 -0
  44. digitalhub/entities/_processors/base.py +4 -0
  45. digitalhub/entities/_processors/context.py +4 -0
  46. digitalhub/entities/_processors/utils.py +4 -0
  47. digitalhub/entities/artifact/__init__.py +3 -0
  48. digitalhub/entities/artifact/_base/__init__.py +3 -0
  49. digitalhub/entities/artifact/_base/builder.py +4 -0
  50. digitalhub/entities/artifact/_base/entity.py +4 -0
  51. digitalhub/entities/artifact/_base/spec.py +4 -0
  52. digitalhub/entities/artifact/_base/status.py +4 -0
  53. digitalhub/entities/artifact/artifact/__init__.py +3 -0
  54. digitalhub/entities/artifact/artifact/builder.py +4 -0
  55. digitalhub/entities/artifact/artifact/entity.py +4 -0
  56. digitalhub/entities/artifact/artifact/spec.py +4 -0
  57. digitalhub/entities/artifact/artifact/status.py +4 -0
  58. digitalhub/entities/artifact/crud.py +4 -0
  59. digitalhub/entities/artifact/utils.py +4 -0
  60. digitalhub/entities/builders.py +4 -0
  61. digitalhub/entities/dataitem/__init__.py +3 -0
  62. digitalhub/entities/dataitem/_base/__init__.py +3 -0
  63. digitalhub/entities/dataitem/_base/builder.py +4 -0
  64. digitalhub/entities/dataitem/_base/entity.py +4 -0
  65. digitalhub/entities/dataitem/_base/spec.py +4 -0
  66. digitalhub/entities/dataitem/_base/status.py +4 -0
  67. digitalhub/entities/dataitem/crud.py +4 -0
  68. digitalhub/entities/dataitem/dataitem/__init__.py +3 -0
  69. digitalhub/entities/dataitem/dataitem/builder.py +4 -0
  70. digitalhub/entities/dataitem/dataitem/entity.py +4 -0
  71. digitalhub/entities/dataitem/dataitem/spec.py +4 -0
  72. digitalhub/entities/dataitem/dataitem/status.py +4 -0
  73. digitalhub/entities/dataitem/iceberg/__init__.py +3 -0
  74. digitalhub/entities/dataitem/iceberg/builder.py +4 -0
  75. digitalhub/entities/dataitem/iceberg/entity.py +4 -0
  76. digitalhub/entities/dataitem/iceberg/spec.py +4 -0
  77. digitalhub/entities/dataitem/iceberg/status.py +4 -0
  78. digitalhub/entities/dataitem/table/__init__.py +3 -0
  79. digitalhub/entities/dataitem/table/builder.py +4 -0
  80. digitalhub/entities/dataitem/table/entity.py +4 -0
  81. digitalhub/entities/dataitem/table/models.py +4 -0
  82. digitalhub/entities/dataitem/table/spec.py +4 -0
  83. digitalhub/entities/dataitem/table/status.py +4 -0
  84. digitalhub/entities/dataitem/table/utils.py +4 -0
  85. digitalhub/entities/dataitem/utils.py +4 -0
  86. digitalhub/entities/function/__init__.py +3 -0
  87. digitalhub/entities/function/_base/__init__.py +3 -0
  88. digitalhub/entities/function/_base/builder.py +4 -0
  89. digitalhub/entities/function/_base/entity.py +4 -46
  90. digitalhub/entities/function/_base/spec.py +4 -0
  91. digitalhub/entities/function/_base/status.py +4 -0
  92. digitalhub/entities/function/crud.py +4 -0
  93. digitalhub/entities/model/__init__.py +3 -0
  94. digitalhub/entities/model/_base/__init__.py +3 -0
  95. digitalhub/entities/model/_base/builder.py +4 -0
  96. digitalhub/entities/model/_base/entity.py +4 -0
  97. digitalhub/entities/model/_base/spec.py +4 -0
  98. digitalhub/entities/model/_base/status.py +4 -0
  99. digitalhub/entities/model/crud.py +4 -0
  100. digitalhub/entities/model/huggingface/__init__.py +3 -0
  101. digitalhub/entities/model/huggingface/builder.py +4 -0
  102. digitalhub/entities/model/huggingface/entity.py +4 -0
  103. digitalhub/entities/model/huggingface/spec.py +4 -0
  104. digitalhub/entities/model/huggingface/status.py +4 -0
  105. digitalhub/entities/model/mlflow/__init__.py +3 -0
  106. digitalhub/entities/model/mlflow/builder.py +4 -0
  107. digitalhub/entities/model/mlflow/entity.py +4 -0
  108. digitalhub/entities/model/mlflow/models.py +4 -0
  109. digitalhub/entities/model/mlflow/spec.py +4 -0
  110. digitalhub/entities/model/mlflow/status.py +4 -0
  111. digitalhub/entities/model/mlflow/utils.py +4 -0
  112. digitalhub/entities/model/model/__init__.py +3 -0
  113. digitalhub/entities/model/model/builder.py +4 -0
  114. digitalhub/entities/model/model/entity.py +4 -0
  115. digitalhub/entities/model/model/spec.py +4 -0
  116. digitalhub/entities/model/model/status.py +4 -0
  117. digitalhub/entities/model/sklearn/__init__.py +3 -0
  118. digitalhub/entities/model/sklearn/builder.py +4 -0
  119. digitalhub/entities/model/sklearn/entity.py +4 -0
  120. digitalhub/entities/model/sklearn/spec.py +4 -0
  121. digitalhub/entities/model/sklearn/status.py +4 -0
  122. digitalhub/entities/model/utils.py +4 -0
  123. digitalhub/entities/project/__init__.py +3 -0
  124. digitalhub/entities/project/_base/__init__.py +3 -0
  125. digitalhub/entities/project/_base/builder.py +4 -0
  126. digitalhub/entities/project/_base/entity.py +4 -0
  127. digitalhub/entities/project/_base/models.py +4 -0
  128. digitalhub/entities/project/_base/spec.py +4 -0
  129. digitalhub/entities/project/_base/status.py +4 -0
  130. digitalhub/entities/project/crud.py +4 -0
  131. digitalhub/entities/project/utils.py +4 -0
  132. digitalhub/entities/run/__init__.py +3 -0
  133. digitalhub/entities/run/_base/__init__.py +3 -0
  134. digitalhub/entities/run/_base/builder.py +4 -0
  135. digitalhub/entities/run/_base/entity.py +4 -0
  136. digitalhub/entities/run/_base/spec.py +4 -0
  137. digitalhub/entities/run/_base/status.py +4 -0
  138. digitalhub/entities/run/crud.py +4 -0
  139. digitalhub/entities/secret/__init__.py +3 -0
  140. digitalhub/entities/secret/_base/__init__.py +3 -0
  141. digitalhub/entities/secret/_base/builder.py +4 -0
  142. digitalhub/entities/secret/_base/entity.py +4 -0
  143. digitalhub/entities/secret/_base/spec.py +4 -0
  144. digitalhub/entities/secret/_base/status.py +4 -0
  145. digitalhub/entities/secret/crud.py +4 -0
  146. digitalhub/entities/task/__init__.py +3 -0
  147. digitalhub/entities/task/_base/__init__.py +3 -0
  148. digitalhub/entities/task/_base/builder.py +4 -0
  149. digitalhub/entities/task/_base/entity.py +4 -0
  150. digitalhub/entities/task/_base/models.py +4 -0
  151. digitalhub/entities/task/_base/spec.py +4 -0
  152. digitalhub/entities/task/_base/status.py +4 -0
  153. digitalhub/entities/task/_base/utils.py +4 -0
  154. digitalhub/entities/task/crud.py +4 -0
  155. digitalhub/entities/trigger/__init__.py +3 -0
  156. digitalhub/entities/trigger/_base/__init__.py +3 -0
  157. digitalhub/entities/trigger/_base/builder.py +4 -0
  158. digitalhub/entities/trigger/_base/entity.py +4 -0
  159. digitalhub/entities/trigger/_base/spec.py +19 -5
  160. digitalhub/entities/trigger/_base/status.py +4 -0
  161. digitalhub/entities/trigger/crud.py +11 -1
  162. digitalhub/entities/trigger/lifecycle/__init__.py +3 -0
  163. digitalhub/entities/trigger/lifecycle/builder.py +23 -0
  164. digitalhub/entities/trigger/lifecycle/entity.py +36 -0
  165. digitalhub/entities/trigger/lifecycle/spec.py +42 -0
  166. digitalhub/entities/trigger/lifecycle/status.py +13 -0
  167. digitalhub/entities/trigger/scheduler/__init__.py +3 -0
  168. digitalhub/entities/trigger/scheduler/builder.py +4 -0
  169. digitalhub/entities/trigger/scheduler/entity.py +4 -0
  170. digitalhub/entities/trigger/scheduler/spec.py +13 -2
  171. digitalhub/entities/trigger/scheduler/status.py +4 -0
  172. digitalhub/entities/workflow/__init__.py +3 -0
  173. digitalhub/entities/workflow/_base/__init__.py +3 -0
  174. digitalhub/entities/workflow/_base/builder.py +4 -0
  175. digitalhub/entities/workflow/_base/entity.py +4 -0
  176. digitalhub/entities/workflow/_base/spec.py +4 -0
  177. digitalhub/entities/workflow/_base/status.py +4 -0
  178. digitalhub/entities/workflow/crud.py +4 -0
  179. digitalhub/factory/__init__.py +3 -0
  180. digitalhub/factory/factory.py +4 -0
  181. digitalhub/factory/utils.py +4 -0
  182. digitalhub/runtimes/__init__.py +3 -0
  183. digitalhub/runtimes/_base.py +4 -0
  184. digitalhub/runtimes/builder.py +4 -0
  185. digitalhub/runtimes/enums.py +4 -0
  186. digitalhub/stores/__init__.py +3 -0
  187. digitalhub/stores/client/__init__.py +3 -0
  188. digitalhub/stores/client/_base/__init__.py +3 -0
  189. digitalhub/stores/client/_base/api_builder.py +4 -0
  190. digitalhub/stores/client/_base/client.py +4 -0
  191. digitalhub/stores/client/_base/key_builder.py +4 -0
  192. digitalhub/stores/client/_base/params_builder.py +4 -0
  193. digitalhub/stores/client/api.py +4 -0
  194. digitalhub/stores/client/builder.py +4 -0
  195. digitalhub/stores/client/dhcore/__init__.py +3 -0
  196. digitalhub/stores/client/dhcore/api_builder.py +4 -0
  197. digitalhub/stores/client/dhcore/client.py +4 -0
  198. digitalhub/stores/client/dhcore/configurator.py +4 -0
  199. digitalhub/stores/client/dhcore/enums.py +4 -0
  200. digitalhub/stores/client/dhcore/error_parser.py +4 -0
  201. digitalhub/stores/client/dhcore/key_builder.py +4 -0
  202. digitalhub/stores/client/dhcore/models.py +4 -0
  203. digitalhub/stores/client/dhcore/params_builder.py +4 -0
  204. digitalhub/stores/client/dhcore/utils.py +4 -0
  205. digitalhub/stores/client/local/__init__.py +3 -0
  206. digitalhub/stores/client/local/api_builder.py +4 -0
  207. digitalhub/stores/client/local/client.py +4 -0
  208. digitalhub/stores/client/local/enums.py +4 -0
  209. digitalhub/stores/client/local/key_builder.py +4 -0
  210. digitalhub/stores/client/local/params_builder.py +4 -0
  211. digitalhub/stores/configurator/__init__.py +3 -0
  212. digitalhub/stores/configurator/api.py +4 -0
  213. digitalhub/stores/configurator/configurator.py +4 -0
  214. digitalhub/stores/configurator/credentials_store.py +4 -0
  215. digitalhub/stores/configurator/enums.py +4 -0
  216. digitalhub/stores/configurator/ini_module.py +4 -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 +4 -0
  220. digitalhub/stores/data/api.py +4 -0
  221. digitalhub/stores/data/builder.py +4 -0
  222. digitalhub/stores/data/enums.py +4 -0
  223. digitalhub/stores/data/local/__init__.py +3 -0
  224. digitalhub/stores/data/local/store.py +4 -0
  225. digitalhub/stores/data/remote/__init__.py +3 -0
  226. digitalhub/stores/data/remote/store.py +4 -0
  227. digitalhub/stores/data/s3/__init__.py +3 -0
  228. digitalhub/stores/data/s3/configurator.py +4 -0
  229. digitalhub/stores/data/s3/enums.py +4 -0
  230. digitalhub/stores/data/s3/store.py +4 -0
  231. digitalhub/stores/data/s3/utils.py +4 -0
  232. digitalhub/stores/data/sql/__init__.py +3 -0
  233. digitalhub/stores/data/sql/configurator.py +4 -0
  234. digitalhub/stores/data/sql/enums.py +4 -0
  235. digitalhub/stores/data/sql/store.py +4 -0
  236. digitalhub/stores/data/utils.py +4 -0
  237. digitalhub/stores/readers/__init__.py +3 -0
  238. digitalhub/stores/readers/data/__init__.py +3 -0
  239. digitalhub/stores/readers/data/_base/__init__.py +3 -0
  240. digitalhub/stores/readers/data/_base/builder.py +4 -0
  241. digitalhub/stores/readers/data/_base/reader.py +4 -0
  242. digitalhub/stores/readers/data/api.py +4 -0
  243. digitalhub/stores/readers/data/factory.py +4 -0
  244. digitalhub/stores/readers/data/pandas/__init__.py +3 -0
  245. digitalhub/stores/readers/data/pandas/builder.py +4 -0
  246. digitalhub/stores/readers/data/pandas/reader.py +4 -0
  247. digitalhub/stores/readers/query/__init__.py +3 -0
  248. digitalhub/utils/__init__.py +3 -0
  249. digitalhub/utils/enums.py +4 -0
  250. digitalhub/utils/exceptions.py +4 -0
  251. digitalhub/utils/file_utils.py +4 -0
  252. digitalhub/utils/generic_utils.py +4 -0
  253. digitalhub/utils/git_utils.py +4 -0
  254. digitalhub/utils/io_utils.py +4 -0
  255. digitalhub/utils/logger.py +4 -0
  256. digitalhub/utils/types.py +4 -0
  257. digitalhub/utils/uri_utils.py +4 -0
  258. digitalhub-0.12.0.dist-info/METADATA +301 -0
  259. digitalhub-0.12.0.dist-info/RECORD +262 -0
  260. digitalhub-0.12.0.dist-info/licenses/AUTHORS +5 -0
  261. digitalhub-0.12.0.dist-info/licenses/LICENSE +201 -0
  262. digitalhub-0.11.0b6.dist-info/METADATA +0 -259
  263. digitalhub-0.11.0b6.dist-info/RECORD +0 -256
  264. digitalhub-0.11.0b6.dist-info/licenses/LICENSE.txt +0 -216
  265. {digitalhub-0.11.0b6.dist-info → digitalhub-0.12.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
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
@@ -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
@@ -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
  from enum import Enum
@@ -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
  from digitalhub.entities._base.entity.spec import Spec, SpecValidator
@@ -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
  from digitalhub.entities._base.entity.status import Status
@@ -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
 
@@ -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
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
  from digitalhub.entities._base.versioned.builder import VersionedBuilder
@@ -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
@@ -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
  from digitalhub.entities._base.entity.spec import Spec, SpecValidator
@@ -8,11 +12,18 @@ class TriggerSpec(Spec):
8
12
  TriggerSpec specifications.
9
13
  """
10
14
 
11
- def __init__(self, task: str, function: str, template: dict) -> None:
15
+ def __init__(
16
+ self,
17
+ task: str,
18
+ template: dict,
19
+ function: str | None = None,
20
+ workflow: str | None = None,
21
+ ) -> None:
12
22
  super().__init__()
13
23
  self.task = task
14
- self.function = function
15
24
  self.template = template
25
+ self.function = function
26
+ self.workflow = workflow
16
27
 
17
28
 
18
29
  class TriggerValidator(SpecValidator):
@@ -23,8 +34,11 @@ class TriggerValidator(SpecValidator):
23
34
  task: str
24
35
  """Task string."""
25
36
 
26
- function: str
37
+ template: dict
38
+ """Template map."""
39
+
40
+ function: str = None
27
41
  """Function string."""
28
42
 
29
- template: dict
30
- """Template string."""
43
+ workflow: str = None
44
+ """Workflow string."""
@@ -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
  from digitalhub.entities._base.entity.status import Status
@@ -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
@@ -18,6 +22,7 @@ def new_trigger(
18
22
  kind: str,
19
23
  task: str,
20
24
  function: str | None = None,
25
+ workflow: str | None = None,
21
26
  uuid: str | None = None,
22
27
  description: str | None = None,
23
28
  labels: list[str] | None = None,
@@ -58,12 +63,17 @@ def new_trigger(
58
63
  >>> kind="trigger",
59
64
  >>> name="my-trigger",)
60
65
  """
66
+ if workflow is None and function is None:
67
+ raise ValueError("Workflow or function must be provided")
61
68
  if kwargs is None:
62
69
  kwargs = {}
63
70
  if template is None:
64
71
  template = {}
65
72
  template["task"] = task
66
- template["function"] = function
73
+ if workflow is not None:
74
+ template["workflow"] = workflow
75
+ if function is not None:
76
+ template["function"] = function
67
77
  kwargs["template"] = template
68
78
  return context_processor.create_context_entity(
69
79
  project=project,
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,23 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from __future__ import annotations
6
+
7
+ from digitalhub.entities._commons.enums import EntityKinds
8
+ from digitalhub.entities.trigger._base.builder import TriggerBuilder
9
+ from digitalhub.entities.trigger.lifecycle.entity import TriggerLifecycle
10
+ from digitalhub.entities.trigger.lifecycle.spec import TriggerSpecLifecycle, TriggerValidatorLifecycle
11
+ from digitalhub.entities.trigger.lifecycle.status import TriggerStatusLifecycle
12
+
13
+
14
+ class TriggerLifecycleBuilder(TriggerBuilder):
15
+ """
16
+ TriggerLifecycle builder.
17
+ """
18
+
19
+ ENTITY_CLASS = TriggerLifecycle
20
+ ENTITY_SPEC_CLASS = TriggerSpecLifecycle
21
+ ENTITY_SPEC_VALIDATOR = TriggerValidatorLifecycle
22
+ ENTITY_STATUS_CLASS = TriggerStatusLifecycle
23
+ ENTITY_KIND = EntityKinds.TRIGGER_LIFECYCLE.value
@@ -0,0 +1,36 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from __future__ import annotations
6
+
7
+ import typing
8
+
9
+ from digitalhub.entities.trigger._base.entity import Trigger
10
+
11
+ if typing.TYPE_CHECKING:
12
+ from digitalhub.entities._base.entity.metadata import Metadata
13
+ from digitalhub.entities.trigger.lifecycle.spec import TriggerSpecLifecycle
14
+ from digitalhub.entities.trigger.lifecycle.status import TriggerStatusLifecycle
15
+
16
+
17
+ class TriggerLifecycle(Trigger):
18
+ """
19
+ TriggerLifecycle class.
20
+ """
21
+
22
+ def __init__(
23
+ self,
24
+ project: str,
25
+ name: str,
26
+ uuid: str,
27
+ kind: str,
28
+ metadata: Metadata,
29
+ spec: TriggerSpecLifecycle,
30
+ status: TriggerStatusLifecycle,
31
+ user: str | None = None,
32
+ ) -> None:
33
+ super().__init__(project, name, uuid, kind, metadata, spec, status, user)
34
+
35
+ self.spec: TriggerSpecLifecycle
36
+ self.status: TriggerStatusLifecycle
@@ -0,0 +1,42 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from __future__ import annotations
6
+
7
+ from pydantic import Field
8
+
9
+ from digitalhub.entities.trigger._base.spec import TriggerSpec, TriggerValidator
10
+
11
+ regexp = r"store://([^/]+)/(.+)"
12
+
13
+
14
+ class TriggerSpecLifecycle(TriggerSpec):
15
+ """
16
+ TriggerSpecLifecycle specifications.
17
+ """
18
+
19
+ def __init__(
20
+ self,
21
+ task: str,
22
+ template: dict,
23
+ function: str | None = None,
24
+ workflow: str | None = None,
25
+ key: str | None = None,
26
+ states: list[str] | None = None,
27
+ ) -> None:
28
+ super().__init__(task, template, function, workflow)
29
+ self.key = key
30
+ self.states = states
31
+
32
+
33
+ class TriggerValidatorLifecycle(TriggerValidator):
34
+ """
35
+ TriggerValidatorLifecycle validator.
36
+ """
37
+
38
+ key: str = Field(pattern=regexp)
39
+ """Entity key."""
40
+
41
+ states: list[str] = None
42
+ """List of entity states."""
@@ -0,0 +1,13 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from __future__ import annotations
6
+
7
+ from digitalhub.entities.trigger._base.status import TriggerStatus
8
+
9
+
10
+ class TriggerStatusLifecycle(TriggerStatus):
11
+ """
12
+ TriggerStatusLifecycle status.
13
+ """
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
  from digitalhub.entities._commons.enums import EntityKinds
@@ -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
@@ -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
  from digitalhub.entities.trigger._base.spec import TriggerSpec, TriggerValidator
@@ -8,8 +12,15 @@ class TriggerSpecScheduler(TriggerSpec):
8
12
  TriggerSpecScheduler specifications.
9
13
  """
10
14
 
11
- def __init__(self, task: str, function: str, template: dict, schedule: str) -> None:
12
- super().__init__(task, function, template)
15
+ def __init__(
16
+ self,
17
+ task: str,
18
+ template: dict,
19
+ function: str | None = None,
20
+ workflow: str | None = None,
21
+ schedule: str | None = None,
22
+ ) -> None:
23
+ super().__init__(task, template, function, workflow)
13
24
  self.schedule = schedule
14
25
 
15
26
 
@@ -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
  from digitalhub.entities.trigger._base.status import TriggerStatus
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
@@ -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
@@ -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
  from digitalhub.entities._base.entity.spec import Spec, SpecValidator
@@ -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
  from digitalhub.entities._base.entity.status import Status
@@ -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
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
@@ -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 importlib
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
  from abc import abstractmethod
@@ -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
@@ -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
  from enum import Enum
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
  from abc import abstractmethod
@@ -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
@@ -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
  from abc import abstractmethod
@@ -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
  from abc import abstractmethod
@@ -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
@@ -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
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.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
  from digitalhub.entities._commons.enums import ApiCategories, BackendOperations
@@ -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
@@ -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
@@ -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
  from enum import Enum
@@ -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
@@ -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
  from digitalhub.stores.client._base.key_builder import ClientKeyBuilder
@@ -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
  from pydantic import BaseModel
@@ -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
  from digitalhub.entities._commons.enums import ApiCategories, BackendOperations
@@ -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 os
@@ -0,0 +1,3 @@
1
+ # SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0