Skip to content
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

Add docs comparing Python and YAML-based DAGs #327

Merged
merged 16 commits into from
Jan 3, 2025
Merged

Add docs comparing Python and YAML-based DAGs #327

merged 16 commits into from
Jan 3, 2025

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Jan 2, 2025

Add documentation illustrating how two Airflow Python DAGs (one using traditional operators, another using TaskFlow API) are represented in Python (standard Airflow) and YAML (DAG Factory).

We use real-world data: one DAG uses Hacker News, and the other uses PyPI stats.

Before we merge this PR, I think we should merge #328 first and rebase this one. I isolated the tooling changes (mkdocs and others) in PR #328.

Close: #319

@tatiana tatiana requested a review from a team as a code owner January 2, 2025 10:00
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.57%. Comparing base (177f608) to head (97c3a70).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   93.31%   93.57%   +0.25%     
==========================================
  Files          10       10              
  Lines         778      778              
==========================================
+ Hits          726      728       +2     
+ Misses         52       50       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tatiana tatiana mentioned this pull request Jan 2, 2025
@tatiana tatiana requested review from pankajkoti, pankajastro and a team January 2, 2025 11:10
@tatiana tatiana added this to the DAG Factory 0.22.0 milestone Jan 2, 2025
tatiana added 13 commits January 3, 2025 11:15
Skipping 2.4 because:
FAILED tests/test_example_dags.py::test_example_dag[example_hackernews_dagfactory] - ImportError: Pandas requires version '0.9.0' or newer of 'tabulate' (version '0.8.10' currently installed).
FAILED tests/test_example_dags.py::test_example_dag[example_pypi_stats_dagfactory] - ImportError: Pandas requires version '0.9.0' or newer of 'tabulate' (version '0.8.10' currently installed).

Skipping 2.3 because:
ERROR tests/test_example_dags.py - AssertionError: assert not {'/home/runner/work/dag-factory/dag-factory/dev/dags/comparison/example_hackernews_plain_airflow.py': 'Traceback (most...ne, start_date=datetime(2022, 3, 4)) as dag:\nTypeError: __init__() got an unexpected keyword argument \'schedule\'\n'}
 +  where {'/home/runner/work/dag-factory/dag-factory/dev/dags/comparison/example_hackernews_plain_airflow.py': 'Traceback (most...ne, start_date=datetime(2022, 3, 4)) as dag:\nTypeError: __init__() got an unexpected keyword argument \'schedule\'\n'} =

Skipping 2.2 due to:
same issue as 2.3
FAILED tests/test_example_dags.py::test_example_dag[example_hackernews_dagfactory] - ImportError: Pandas requires version '0.9.0' or newer of 'tabulate' (version '0.8.9' currently installed).
FAILED tests/test_example_dags.py::test_example_dag[example_pypi_stats_dagfactory] - ImportError: Pandas requires version '0.9.0' or newer of 'tabulate' (version '0.8.9' currently installed).
Copy link
Contributor

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with real world data analysis here :)

A couple of minor suggestions inline

docs/comparison/traditional_operators.md Outdated Show resolved Hide resolved
docs/comparison/traditional_operators.md Show resolved Hide resolved
docs/comparison/taskflow_api.md Show resolved Hide resolved
@tatiana tatiana merged commit 38555b1 into main Jan 3, 2025
67 checks passed
@tatiana tatiana deleted the issue-319 branch January 3, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add migration docs
4 participants