Closed vachillo closed 3 months ago
I love this enhancement idea - it'll make things much more intuitive! :)
I think this should be implemented via the following:
BaseTask.parents/children
from a property to an attrs
field.BaseTask.parent_ids/child_ids
from an attrs
field to a property.BaseTask.add_parent/add_child
to only accept task: BaseTask
. Add the Task to BaseTask.parents/children
.Structure.resolve_tasks()
that recursively explores all children of the Tasks in Structure.tasks
. If a child is not found in Structure.tasks
, add it.focusing on improving documentation rather than changing the syntax. closes #922
Is your feature request related to a problem? Please describe. When using the imperative syntax to build a
Workflow
, you should not have to also explicitly list all tasks in the workflow as well.Describe the solution you'd like For example (taken from the docs):
the explicit passing of the list of tasks should not be required and instead it should be possible to do this:
where the only task added to the workflow contains references to its other tasks, and the workflow should work out the DAG by itself.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.