-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.10.1
-
Component/s: None
-
Labels:None
I think it's important to have the example DAGs reflect good programming standards and how to write clean and concise Airflow code. Therefore, refactor the example DAGs, which mostly involves:
- Replace set_upstream() and set_downstream() by the bitshift operators, since they exist since Airflow 1.8 and everybody uses those now.
- Optimise imports (grouping by stdlib/3rd party/own and alphabetic ordering).
- Place function calls with arguments on single line if line is short enough, or put each function argument on a new line, but don't mix.
- Passing list of tasks when setting dependencies instead of making multiple set_up/down-stream calls.
- Switch upstream dependencies into downstream dependencies since these are more logical to read IMO.
- links to