Skip to content

Investigate decorator functionality #2

@Kitchi

Description

@Kitchi

It would be cool to wrap Python functions to create the DAG layers, something like

from dagger import dagcorator

# define some submit_list with variables to iterate over

@dagcorator.add_to_layer(layer_name = 'A', submit_vars = submit_list)
def func1:
    # parse args, etc.
    return

@dagcorator.add_to_layer(layer_name='B', submit_vars = submit_list_2)
def func2():
    # parse args etc.
    return 


if __name__ == '__main__':
    func1()
    func2()

Need to think through the usage patterns a little more, I'm not clear about how exactly to proceed with this at the moment.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions