-
Notifications
You must be signed in to change notification settings - Fork 210
Support tasks and task_groups as lists #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #487 +/- ##
==========================================
- Coverage 93.76% 93.70% -0.06%
==========================================
Files 11 11
Lines 1042 1080 +38
==========================================
+ Hits 977 1012 +35
- Misses 65 68 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I have logged a follow-up ticket: #491 to update example DAGs and docs to reflect authoring tasks as list. Will work on a quick follow-up PR to do that once this change is avaialble and merged. Keeping the scope of this PR limited to ease reviews. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very exciting feature, and it's great it is backwards compatible.
I left an implementation feedback inline, but happy with the feature!
e0457d2
to
bdbf8df
Compare
What?
This change adds first-class support for list-based syntax in DAG-Factory YAML:
Until now, both sections had to be dictionaries keyed by task_id / group_id. Authors can now opt for a cleaner, order-preserving list format while everything still works in dictionary form.
Why?
The list style is more natural, readable, and aligns with common YAML patterns.
Example before ⬇️
Example after ⬇️
Same goes for
task_groups
:Implementation details
DagBuilder.build()
now:Detects if
tasks
ortask_groups
is a list.Converts each list to the existing dict structure (task_id / group_name key becomes dict key).
Performs validation:
No downstream code had to change – all later logic still sees a dictionary.
Backwards compatibility
Existing dictionary syntax continues to work unchanged.
Tests covering legacy pattern remain green.
closes: #468