Beispiel #1
0
 def from_dict(cls, context, d):
     converted = {k: context.from_dict(v) for k, v in six.iteritems(d)}
     kwargs = Process.kwarg_dict(converted)
     kwargs.update({
         'script': d['script'],
         'engine': d['engine'],
         'context': context,
         'inputs': [InputParameter.from_dict(context, inp)
                    for inp in converted.get('inputs', [])],
         'outputs': [OutputParameter.from_dict(context, inp)
                     for inp in converted.get('outputs', [])]
     })
     return cls(**kwargs)
Beispiel #2
0
 def from_dict(cls, context, d):
     converted = {k: context.from_dict(v) for k, v in six.iteritems(d)}
     kwargs = Process.kwarg_dict(converted)
     kwargs.update({
         'base_command': converted['baseCommand'],
         'arguments': converted.get('arguments'),
         'stdin': converted.get('stdin'),
         'stdout': converted.get('stdout'),
         'inputs': [InputParameter.from_dict(context, inp)
                    for inp in converted.get('inputs', [])],
         'outputs': [OutputParameter.from_dict(context, inp)
                     for inp in converted.get('outputs', [])]
     })
     return cls(**kwargs)
Beispiel #3
0
 def from_dict(cls, context, d):
     cls.infer_step_id(d)
     converted = {
         k: process_builder(context, v) if k == 'run' else context.from_dict(v)
         for k, v in six.iteritems(d)
     }
     kwargs = Process.kwarg_dict(converted)
     kwargs.update({
         'app': converted['run'],
         'inputs': [WorkflowStepInput.from_dict(context, inp)
                    for inp in converted.get('inputs', [])],
         'outputs': [OutputParameter.from_dict(context, inp)
                     for inp in converted.get('outputs', [])],
         'scatter': converted.get('scatter')
     })
     return cls(**kwargs)
Beispiel #4
0
 def from_dict(cls, context, d):
     converted = {k: context.from_dict(v) for k, v in six.iteritems(d)}
     kwargs = Process.kwarg_dict(converted)
     kwargs.update({
         'script':
         d['expression']['script'],
         'engine':
         d['expression']['engine'],
         'context':
         context,
         'inputs': [
             InputParameter.from_dict(context, inp)
             for inp in converted.get('inputs', [])
         ],
         'outputs': [
             OutputParameter.from_dict(context, inp)
             for inp in converted.get('outputs', [])
         ]
     })
     return cls(**kwargs)
Beispiel #5
0
 def from_dict(cls, context, d):
     converted = {k: context.from_dict(v) for k, v in six.iteritems(d)}
     kwargs = Process.kwarg_dict(converted)
     kwargs.update({
         'base_command':
         converted['baseCommand'],
         'arguments':
         converted.get('arguments'),
         'stdin':
         converted.get('stdin'),
         'stdout':
         converted.get('stdout'),
         'inputs': [
             InputParameter.from_dict(context, inp)
             for inp in converted.get('inputs', [])
         ],
         'outputs': [
             OutputParameter.from_dict(context, inp)
             for inp in converted.get('outputs', [])
         ]
     })
     return cls(**kwargs)
Beispiel #6
0
 def from_dict(cls, context, d):
     cls.infer_step_id(d)
     converted = {
         k:
         process_builder(context, v) if k == 'run' else context.from_dict(v)
         for k, v in six.iteritems(d)
     }
     kwargs = Process.kwarg_dict(converted)
     kwargs.update({
         'app':
         converted['run'],
         'inputs': [
             WorkflowStepInput.from_dict(context, inp)
             for inp in converted.get('inputs', [])
         ],
         'outputs': [
             OutputParameter.from_dict(context, inp)
             for inp in converted.get('outputs', [])
         ],
         'scatter':
         converted.get('scatter')
     })
     return cls(**kwargs)