@@ -379,38 +379,15 @@ def execute(self, *args, **kwargs):
379379
380380 LOGGER .setLevel (logging .INFO )
381381 LOGGER .handlers = [log_handler ]
382- self .workflow_level_promise = self . _replace_input_arguments ( self . workflow_level_promise ,
383- args , kwargs )
382+ self .workflow_level_promise = noodles . workflow . from_call (
383+ noodles . get_workflow ( self . workflow_level_promise ). root_node . foo , args , kwargs , {} )
384384 result = noodles .run_single (self .workflow_level_promise )
385385
386386 # Generate the retrospective provenance as a (nano-) Publication object
387387 retroprov = self ._generate_retrospective_prov_publication (log .getvalue ())
388388
389389 return result , retroprov
390390
391- def _replace_input_arguments (self , promise : noodles .interface .PromisedObject , args , kwargs ):
392- """
393- Replace the input arguments of the promise so we can run the workflow with the right
394- inputs. This goes into the guts of noodles, doing something noodles was not intended to be
395- used for.
396- TODO: find a better solution for this
397- """
398- workflow = noodles .get_workflow (promise )
399- signature = inspect .signature (workflow .root_node .foo )
400- arguments_dict = self ._get_arguments_dict (args , kwargs , signature )
401- workflow .root_node .bound_args = inspect .BoundArguments (signature , arguments_dict )
402- return promise
403-
404- @staticmethod
405- def _get_arguments_dict (args , kwargs , signature ):
406- """
407- Create dictionary of keyword arguments from positional and keyword arguments and the
408- signature of the function.
409- """
410- arguments_dict = {key : arg for arg , key in zip (args , signature .parameters .keys ())}
411- arguments_dict .update (kwargs )
412- return arguments_dict
413-
414391 def _generate_retrospective_prov_publication (self , log :str ) -> nanopub .Publication :
415392 """
416393 Utility method for generating a Publication object for the retrospective
0 commit comments