digitalhub 0.9.0b2__py3-none-any.whl → 0.9.0b3__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.
- digitalhub/entities/_base/entity/entity.py +6 -4
- digitalhub/entities/_operations/processor.py +1 -1
- digitalhub/entities/function/_base/entity.py +1 -1
- digitalhub/entities/workflow/_base/entity.py +6 -3
- {digitalhub-0.9.0b2.dist-info → digitalhub-0.9.0b3.dist-info}/METADATA +1 -1
- {digitalhub-0.9.0b2.dist-info → digitalhub-0.9.0b3.dist-info}/RECORD +9 -9
- {digitalhub-0.9.0b2.dist-info → digitalhub-0.9.0b3.dist-info}/LICENSE.txt +0 -0
- {digitalhub-0.9.0b2.dist-info → digitalhub-0.9.0b3.dist-info}/WHEEL +0 -0
- {digitalhub-0.9.0b2.dist-info → digitalhub-0.9.0b3.dist-info}/top_level.txt +0 -0
|
@@ -79,7 +79,7 @@ class Entity(Base):
|
|
|
79
79
|
Abstract export method.
|
|
80
80
|
"""
|
|
81
81
|
|
|
82
|
-
def add_relationship(self, relation: str,
|
|
82
|
+
def add_relationship(self, relation: str, dest: str, source: str | None = None) -> None:
|
|
83
83
|
"""
|
|
84
84
|
Add relationship to entity metadata.
|
|
85
85
|
|
|
@@ -87,10 +87,10 @@ class Entity(Base):
|
|
|
87
87
|
----------
|
|
88
88
|
relation : str
|
|
89
89
|
The type of relationship.
|
|
90
|
+
dest : str
|
|
91
|
+
The target entity.
|
|
90
92
|
source : str
|
|
91
93
|
The source entity.
|
|
92
|
-
dest : str
|
|
93
|
-
The target entity..
|
|
94
94
|
|
|
95
95
|
Returns
|
|
96
96
|
-------
|
|
@@ -98,7 +98,9 @@ class Entity(Base):
|
|
|
98
98
|
"""
|
|
99
99
|
if self.metadata.relationships is None:
|
|
100
100
|
self.metadata.relationships = []
|
|
101
|
-
obj = {"type": relation, "
|
|
101
|
+
obj = {"type": relation, "dest": dest}
|
|
102
|
+
if source is not None:
|
|
103
|
+
obj["source"] = source
|
|
102
104
|
self.metadata.relationships.append(obj)
|
|
103
105
|
|
|
104
106
|
def to_dict(self) -> dict:
|
|
@@ -559,7 +559,7 @@ class OperationsProcessor:
|
|
|
559
559
|
context = self._get_context(kwargs["project"])
|
|
560
560
|
obj = build_entity_from_params(**kwargs)
|
|
561
561
|
if context.is_running:
|
|
562
|
-
obj.add_relationship(Relationship.PRODUCEDBY.value,
|
|
562
|
+
obj.add_relationship(Relationship.PRODUCEDBY.value, context.get_run_ctx())
|
|
563
563
|
|
|
564
564
|
new_obj: MaterialEntity = self._create_context_entity(context, obj.ENTITY_TYPE, obj.to_dict())
|
|
565
565
|
new_obj = build_entity_from_dict(new_obj)
|
|
@@ -82,7 +82,7 @@ class Function(ExecutableEntity):
|
|
|
82
82
|
run = task.run(run_kind, save=False, local_execution=local_execution, **kwargs)
|
|
83
83
|
|
|
84
84
|
# Set as run's parent
|
|
85
|
-
run.add_relationship(Relationship.RUN_OF.value,
|
|
85
|
+
run.add_relationship(Relationship.RUN_OF.value, self.key)
|
|
86
86
|
run.save()
|
|
87
87
|
|
|
88
88
|
# If execution is done by DHCore backend, return the object
|
|
@@ -44,7 +44,7 @@ class Workflow(ExecutableEntity):
|
|
|
44
44
|
def run(
|
|
45
45
|
self,
|
|
46
46
|
action: str,
|
|
47
|
-
wait: bool =
|
|
47
|
+
wait: bool = False,
|
|
48
48
|
log_info: bool = True,
|
|
49
49
|
**kwargs,
|
|
50
50
|
) -> Run:
|
|
@@ -55,7 +55,10 @@ class Workflow(ExecutableEntity):
|
|
|
55
55
|
----------
|
|
56
56
|
action : str
|
|
57
57
|
Action to execute.
|
|
58
|
-
|
|
58
|
+
wait : bool
|
|
59
|
+
Flag to wait for execution to finish.
|
|
60
|
+
log_info : bool
|
|
61
|
+
Flag to log information while waiting.
|
|
59
62
|
**kwargs : dict
|
|
60
63
|
Keyword arguments passed to Run builder.
|
|
61
64
|
|
|
@@ -79,7 +82,7 @@ class Workflow(ExecutableEntity):
|
|
|
79
82
|
run = task.run(run_kind, save=False, local_execution=False, **kwargs)
|
|
80
83
|
|
|
81
84
|
# Set as run's parent
|
|
82
|
-
run.add_relationship(Relationship.RUN_OF.value,
|
|
85
|
+
run.add_relationship(Relationship.RUN_OF.value, self.key)
|
|
83
86
|
run.save()
|
|
84
87
|
|
|
85
88
|
if wait:
|
|
@@ -27,7 +27,7 @@ digitalhub/entities/_base/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
|
|
|
27
27
|
digitalhub/entities/_base/context/entity.py,sha256=4IWC6f0YKpEBPCXrKlkkvnOqT1urQ4mbjwre4LUWxk4,3270
|
|
28
28
|
digitalhub/entities/_base/entity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
digitalhub/entities/_base/entity/builder.py,sha256=vegnR3aBLhuA371vFVQvMXX4KfpVFl-Z7h1ydt6r6Hg,4518
|
|
30
|
-
digitalhub/entities/_base/entity/entity.py,sha256=
|
|
30
|
+
digitalhub/entities/_base/entity/entity.py,sha256=BFVKE5CToh4JOdwseAGMhdpoCiD3kaGRhNA9SuRCixE,3223
|
|
31
31
|
digitalhub/entities/_base/entity/metadata.py,sha256=_ogwoo7NOExxVPml9h1vbbAryFiAVpuEuSBQsd_VRjU,2261
|
|
32
32
|
digitalhub/entities/_base/entity/spec.py,sha256=t0sPXHCb8zyWyMW_UvTfGyUkG_CUEGz427kvGhsQ8s0,1500
|
|
33
33
|
digitalhub/entities/_base/entity/status.py,sha256=NHB1kLHefoMhhkt_2BFPNojbWMW_Nc8TTGFQNOiyOt0,1044
|
|
@@ -58,7 +58,7 @@ digitalhub/entities/_commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
58
58
|
digitalhub/entities/_commons/enums.py,sha256=pjhbOMzAABRPbV6XNt-2Lyn2kLWIFBAwpeboCtvnz1w,1861
|
|
59
59
|
digitalhub/entities/_commons/utils.py,sha256=_HL6zFSCL_2ug4LpXcxK1MJQQhWL34wj1B2q0Ie0TKU,1792
|
|
60
60
|
digitalhub/entities/_operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
-
digitalhub/entities/_operations/processor.py,sha256=
|
|
61
|
+
digitalhub/entities/_operations/processor.py,sha256=C5LHmV19Ovk5e4E329TbkdYqIrJ26UOQjnkYBHQk018,46654
|
|
62
62
|
digitalhub/entities/artifact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
63
|
digitalhub/entities/artifact/crud.py,sha256=y69PyoWAYOx-Pl_wnds3M0xSLNbADpdV_xG4zElJ0aI,7824
|
|
64
64
|
digitalhub/entities/artifact/utils.py,sha256=NNzD2AcIJzmV_Jo_8k5ZcSp2arKcZ07CCIYKn2lvoKM,1320
|
|
@@ -100,7 +100,7 @@ digitalhub/entities/function/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
100
100
|
digitalhub/entities/function/crud.py,sha256=1-fRWVmOXVV305p0GW0n02FEcengw7QxLxxgxsCC7eM,6592
|
|
101
101
|
digitalhub/entities/function/_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
102
|
digitalhub/entities/function/_base/builder.py,sha256=xTVOpH3GYU-BqtzMEuI3uMtLLvF9IYfrVYMVPkkJc2g,2035
|
|
103
|
-
digitalhub/entities/function/_base/entity.py,sha256=
|
|
103
|
+
digitalhub/entities/function/_base/entity.py,sha256=YYFxtLAZEhcWOzGlGjqRPXmGRb8wBK1KOXyVPo9ZGSw,3093
|
|
104
104
|
digitalhub/entities/function/_base/spec.py,sha256=SjCtp3JBUTPTLMY_TE8wM1HPKVl7jH_wFEqQXBj1rfo,274
|
|
105
105
|
digitalhub/entities/function/_base/status.py,sha256=N-Z1hw13qV7kWFJLQPaH3rRZ2z7AvZeuWYER95lG344,170
|
|
106
106
|
digitalhub/entities/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -168,7 +168,7 @@ digitalhub/entities/workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
168
168
|
digitalhub/entities/workflow/crud.py,sha256=O_Zq30NG-cy7RU1GG88XNi8ids7vrRJAR95PTMYncGM,6517
|
|
169
169
|
digitalhub/entities/workflow/_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
170
|
digitalhub/entities/workflow/_base/builder.py,sha256=wRgot2pbXjc-Cw549uDo1zFOGKdE7wVqxCboeNoXe-Q,2035
|
|
171
|
-
digitalhub/entities/workflow/_base/entity.py,sha256=
|
|
171
|
+
digitalhub/entities/workflow/_base/entity.py,sha256=yQKsoJqWRRgYVQJ0wWvu4krx1DpRM9JL4Irb_874Kqs,2516
|
|
172
172
|
digitalhub/entities/workflow/_base/spec.py,sha256=UoKOUEqKDFACQwctDWfwhro77m3kvjhLDGOhhfRvEzQ,274
|
|
173
173
|
digitalhub/entities/workflow/_base/status.py,sha256=W0j0CNdu9o2vbk0awpnDrpgwf_fZpgdtct4s0BxRdyk,170
|
|
174
174
|
digitalhub/factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -223,8 +223,8 @@ test/local/CRUD/test_dataitems.py,sha256=LQqTzI59uwTGy4zoq8jL0yWVe2W9vXlatkgDU9a
|
|
|
223
223
|
test/local/CRUD/test_models.py,sha256=msosbZuRwIMbZtmi3ZaOva4TjQ4lrzkNu9AguIFhrSo,2929
|
|
224
224
|
test/local/imports/test_imports.py,sha256=W-YugO0rpJwvtWp57MXaXfEmE-f5iWuCiLY-n0ZU4z8,1271
|
|
225
225
|
test/local/instances/test_validate.py,sha256=bGPKRFR_Tb5nlzzmI_ty_6UVUvYGseE2-pkNVoGWeO0,1842
|
|
226
|
-
digitalhub-0.9.
|
|
227
|
-
digitalhub-0.9.
|
|
228
|
-
digitalhub-0.9.
|
|
229
|
-
digitalhub-0.9.
|
|
230
|
-
digitalhub-0.9.
|
|
226
|
+
digitalhub-0.9.0b3.dist-info/LICENSE.txt,sha256=_yVOtnbW7Ss28mp058UEEc1X4Rgj8-kQBP_kj8_Sc88,11585
|
|
227
|
+
digitalhub-0.9.0b3.dist-info/METADATA,sha256=3AXEwBDEr7vREKj1Jt-IySOXq_h9_QeAAjpuE6eM2VQ,15316
|
|
228
|
+
digitalhub-0.9.0b3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
229
|
+
digitalhub-0.9.0b3.dist-info/top_level.txt,sha256=ae9pDfCF27ZoaVAxuBKONMP0lm5P-N_I-e-no1WlvD8,16
|
|
230
|
+
digitalhub-0.9.0b3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|