Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
requires-python = ">=3.8"
dependencies = [
"ewokscore >=4.0.1",
"pypushflow >=1.1.0"
"pypushflow >=2.0.0rc1"
]

[project.urls]
Expand Down
16 changes: 7 additions & 9 deletions src/ewoksppf/bindings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import pprint
import warnings
from contextlib import contextmanager
from typing import Generator
Expand Down Expand Up @@ -81,13 +80,13 @@ def __init__(self, node_id, node_attrs, **kw):
kw["name"] = ppfname(node_id)
super().__init__(**kw)

def trigger(self, inData: dict):
def _execute(self, inData: dict, _scope_id: Optional[str] = None) -> None:
# Update the INFOKEY with node information
infokey = ppfrunscript.INFOKEY
inData[infokey] = dict(inData[infokey])
inData[infokey]["node_id"] = self.node_id
inData[infokey]["node_attrs"] = self.node_attrs
return super().trigger(inData)
super()._execute(inData, _scope_id=_scope_id)

def compileDownstreamData(self, result: dict) -> dict:
# Merging inputs and outputs to trigger the next task
Expand Down Expand Up @@ -152,8 +151,7 @@ def _conditions_fulfilled(self, inData: dict) -> bool:
return False
return True

def trigger(self, inData):
self.logger.info("triggered with inData =\n %s", pprint.pformat(inData))
def _execute(self, inData: dict, _scope_id: Optional[str] = None) -> None:
self.setStarted()
trigger = self._conditions_fulfilled(inData)
self.setFinished()
Expand Down Expand Up @@ -187,8 +185,7 @@ def connect(self, actor):
if isinstance(actor, InputMergeActor):
actor.require_input_from_actor(self)

def trigger(self, inData: dict):
self.logger.info("triggered with inData =\n %s", pprint.pformat(inData))
def _execute(self, inData: dict, _scope_id: Optional[str] = None) -> None:
is_error = "WorkflowExceptionInstance" in inData and inData.get(
"_NewWorkflowException"
)
Expand Down Expand Up @@ -235,8 +232,9 @@ def require_input_from_actor(self, actor):
if actor.required:
self.requiredInData[actor] = None

def trigger(self, inData: dict, source=None):
self.logger.info("triggered with inData =\n %s", pprint.pformat(inData))
def _execute(
self, inData: dict, _scope_id: Optional[str] = None, source=None
) -> None:
self.setStarted()
self.setFinished()
if source is None:
Expand Down
Loading