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 incipient documentation tooling #328

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Add incipient documentation tooling #328

merged 1 commit into from
Jan 2, 2025

Conversation

tatiana
Copy link
Collaborator

@tatiana tatiana commented Jan 2, 2025

This PR introduces an incipient version for documentation tooling in DAG Factory.

It introduces three requirements to create/generate documentation:

  • Mkdocs (tool recommended by the Astronomer docs team)
  • Mike (for documentation versioning)
  • pymdown-extensions (so we can leverage Snippets for injecting code from other files inline in the Markdown files)

Also, it introduces three new hatch commands:

  • hatch run docs:build: builds the docs locally, generating the correspondent static HTML website;
  • hatch run docs:serve: builds and serves the docs locally at localhost:8080;
  • hatch run docs:release: creates a version release using the version specified in dagfactory/__init__.py using Mike

This screenshot illustrates versioning:
Screenshot 2025-01-02 at 10 11 18

This screenshot illustrates code snippets:
Screenshot 2025-01-02 at 10 11 40

- Install Mkdocs
- Install Mike (for documetation versioning)
- Install pymdown-extensions (so we can leverage Snippets, for injecting code from other files inline in the Markdown files)

Also introduce three hash commands:
- hatch run docs:build
- hatch run docs:serve
- hatch run docs:release

The first builds the docs locally, the second serves them at localhost:8080 and the last creates a version release using Mike and sets it as the latest.
@tatiana tatiana requested a review from a team as a code owner January 2, 2025 10:15
@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.29%. Comparing base (c171166) to head (db38d53).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #328   +/-   ##
=======================================
  Coverage   93.29%   93.29%           
=======================================
  Files          10       10           
  Lines         776      776           
=======================================
  Hits          724      724           
  Misses         52       52           

☔ 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 merged commit a53c765 into main Jan 2, 2025
67 checks passed
@tatiana tatiana deleted the docs-tooling branch January 2, 2025 11:34
@tatiana tatiana added this to the DAG Factory 0.22.0 milestone Jan 2, 2025
]

[tool.hatch.envs.docs.scripts]
build = "mike deploy --push dev"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We just realised that this is publishing to GH pages 🙈
We'll fix this as part of #279

tatiana added a commit that referenced this pull request Jan 3, 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
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.

4 participants