Add sphinx-airflow-theme as uv workspace member#65840
Draft
srchilukoori wants to merge 1 commit intoapache:mainfrom
Draft
Add sphinx-airflow-theme as uv workspace member#65840srchilukoori wants to merge 1 commit intoapache:mainfrom
srchilukoori wants to merge 1 commit intoapache:mainfrom
Conversation
9cc9bb4 to
6e4caa7
Compare
6e4caa7 to
02b9bc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sphinx_airflow_theme(v0.3.9) templates fromapache/airflow-siteintodocs-theme/as a uv workspace member.whlURL dependency with a local workspace dependency_gen/— minified CSS/JS/fonts) are not committed to git; a fetch script extracts them from the published wheel on demandCloses: #45576
Changes
docs-theme/: Vendored theme source (templates, config) fromapache/airflow-site—_gen/is gitignoredscripts/ci/fetch_theme_assets.py: Idempotent script that downloads the published wheel fromairflow.apache.organd extracts_gen/intodocs-theme/sphinx_airflow_theme/static/. Version-stamped to skip redundant downloadsdocs-theme/sphinx_airflow_theme/__init__.py: Added guard that raisesFileNotFoundErrorwith clear instructions if_gen/is missing. Fixed pre-existing bug where"__version__"was returned as a literal string instead of the version variablepyproject.toml: Addeddocs-themeto[tool.uv.workspace]members andsphinx-airflow-themeto[tool.uv.sources]devel-common/pyproject.toml: Changedsphinx-airflow-themefrom.whlURL to standard version specifier (>=0.3.9)Dockerfile.ci: AddedRUN python fetch_theme_assets.pyso CI images have_gen/assets — required for task-sdk docs inventory tests that runsphinx-buildindependently ofbreeze build-docsdev/breeze/src/airflow_breeze/commands/developer_commands.py: Auto-fetches theme assets beforebuild-docsif_gen/is missingdev/breeze/src/airflow_breeze/utils/docker_command_utils.py: Addeddocs-themetoVOLUMES_FOR_SELECTED_MOUNTSscripts/ci/prek/upgrade_important_versions.py: Restored theme version tracking — now updates__init__.pyversion instead of the old wheel URL pattern.pre-commit-config.yaml: Removed_gen/exclusions (no longer tracked in git)selective_checks.py: Removed redundant^docs-themepattern (already matched by^docs)dev/breeze/tests/test_theme_workspace.py: Tests verifying workspace wiring, gitignore, and fetch script presenceDesign decisions
_gen/? It's 1.1MB of minified CSS, vendored JS (3 jQuery versions, 2 Popper versions), and binary fonts — 92% of the theme by size. Keeping build artifacts out of git avoids permanent repo bloat.airflow.apache.orgis the same source the current dependency already uses. No new infrastructure required.__init__.py? Without_gen/, Sphinx fails with cryptic errors. The guard gives a one-line fix instruction.Dockerfile.ci? Task-SDK tests runsphinx-buildto verify docs inventory matches the public API. This runs inside the CI image, not viabreeze build-docs, so the image itself needs the assets.Motivation
As described in #45576, modifying the Sphinx docs theme currently requires building and publishing a
.whltoairflow.apache.orgbefore changes can be tested against Airflow docs. Adding the theme as a uv workspace member meansuv syncresolves it from the localdocs-theme/directory. Editing a template and rebuilding docs immediately reflects the change.Was generative AI tooling used to co-author this PR?