Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow-core/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Task SDK

For Airflow Task SDK, see the standalone reference & tutorial site:

https://airflow.apache.org/docs/task-sdk/stable/
:doc:`task-sdk:index`

Dags
-----------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

PROVIDER_NAME_FORMAT = "apache-airflow-providers-{}"

NON_SHORT_NAME_PACKAGES = ["docker-stack", "helm-chart", "apache-airflow"]
NON_SHORT_NAME_PACKAGES = ["docker-stack", "helm-chart", "apache-airflow", "task-sdk"]

PACKAGES_METADATA_EXCLUDE_NAMES = ["docker-stack", "apache-airflow-providers"]

Expand Down
2 changes: 2 additions & 0 deletions dev/breeze/tests/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def test_get_available_packages_include_non_provider_doc_packages_and_all_provid
def test_get_short_package_name():
assert get_short_package_name("apache-airflow") == "apache-airflow"
assert get_short_package_name("docker-stack") == "docker-stack"
assert get_short_package_name("task-sdk") == "task-sdk"
assert get_short_package_name("apache-airflow-providers-amazon") == "amazon"
assert get_short_package_name("apache-airflow-providers-apache-hdfs") == "apache.hdfs"

Expand All @@ -96,6 +97,7 @@ def test_error_on_get_short_package_name():
def test_get_long_package_name():
assert get_long_package_name("apache-airflow") == "apache-airflow"
assert get_long_package_name("docker-stack") == "docker-stack"
assert get_long_package_name("task-sdk") == "task-sdk"
assert get_long_package_name("amazon") == "apache-airflow-providers-amazon"
assert get_long_package_name("apache.hdfs") == "apache-airflow-providers-apache-hdfs"

Expand Down
2 changes: 1 addition & 1 deletion devel-common/src/sphinx_exts/airflow_intersphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _generate_provider_intersphinx_mapping() -> dict[str, tuple[str, tuple[str,
provider_base_url,
(doc_inventory.as_posix() if doc_inventory.exists() else cache_inventory.as_posix(),),
)
for pkg_name in ["apache-airflow", "helm-chart"]:
for pkg_name in ["apache-airflow", "helm-chart", "task-sdk"]:
if os.environ.get("AIRFLOW_PACKAGE_NAME") == pkg_name:
continue
doc_inventory = GENERATED_PATH / "_build" / "docs" / pkg_name / current_version / "objects.inv"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,16 @@
</p>
</div>
</div>
<div class="row">
<div class="col">
<h2><a href="/docs/apache-airflow-providers/index.html">Providers packages</a></h2>
<p>
Providers packages include integrations with third party integrations. They are updated independently of the Apache Airflow core.
</p>
<ul class="list-providers">
{% for provider in providers %}
<li><a href="/docs/{{ provider['package-name'] }}/stable/index.html"><code>{{ provider['name'] }}</code></a></li>
{% endfor %}
</ul>

<div class="row">
<div class="col">
<h2><a href="/docs/task-sdk/stable/index.html">Task SDK</a></h2>
<p>
Task-SDK interface that is used to communicate with airflow core from other components.
</p>
</div>
</div>
</div>

<div class="row">
<div class="col-md order-md-1">
<img src="/docs/docker-stack/_images/docker-logo.png" alt="Docker - logo" width="100" height="86">
Expand All @@ -90,6 +87,19 @@
</p>
</div>
</div>
<div class="row">
<div class="col">
<h2><a href="/docs/apache-airflow-providers/index.html">Providers packages</a></h2>
<p>
Providers packages include integrations with third party integrations. They are updated independently of the Apache Airflow core.
</p>
<ul class="list-providers">
{% for provider in providers %}
<li><a href="/docs/{{ provider['package-name'] }}/stable/index.html"><code>{{ provider['name'] }}</code></a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
</body>
</html>
3 changes: 3 additions & 0 deletions devel-common/src/sphinx_exts/docs_build/docs_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def __init__(self, package_name: str) -> None:
self.is_airflow = False
self.is_chart = False
self.is_docker_stack = False
self.is_task_sdk = False
self.is_providers_summary = False
self.is_autobuild = False
if self.package_name.startswith("apache-airflow-providers-"):
Expand All @@ -61,6 +62,8 @@ def __init__(self, package_name: str) -> None:
self.is_airflow = True
if self.package_name == "helm-chart":
self.is_chart = True
if self.package_name == "task-sdk":
self.is_task_sdk = True
if self.package_name == "docker-stack":
self.is_docker_stack = True
if self.package_name == "apache-airflow-providers":
Expand Down
4 changes: 2 additions & 2 deletions devel-common/src/sphinx_exts/docs_build/fetch_inventories.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _is_outdated(path: str):


def should_be_refreshed(pkg_name: str, refresh_airflow_inventories: bool) -> bool:
if pkg_name in ["helm-chart", "docker-stack"] or pkg_name.startswith("apache-airflow"):
if pkg_name in ["helm-chart", "docker-stack", "task-sdk"] or pkg_name.startswith("apache-airflow"):
return refresh_airflow_inventories
return False

Expand All @@ -117,7 +117,7 @@ def fetch_inventories(clean_build: bool, refresh_airflow_inventories: bool = Fal
(CACHE_PATH / pkg_name / "objects.inv").as_posix(),
)
)
for pkg_name in ["apache-airflow", "helm-chart"]:
for pkg_name in ["apache-airflow", "helm-chart", "task-sdk"]:
to_download.append(
(
pkg_name,
Expand Down
2 changes: 2 additions & 0 deletions devel-common/src/sphinx_exts/docs_build/package_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def find_packages_to_build(available_packages: list[str], package_filters: list[
package_name = "apache-airflow"
elif folder_name == "chart":
package_name = "helm-chart"
elif folder_name == "task-sdk":
package_name = "task-sdk"
else:
try:
import tomllib
Expand Down
9 changes: 9 additions & 0 deletions task-sdk/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# under the License.
from __future__ import annotations

import os
import sys
from pathlib import Path

Expand All @@ -35,9 +36,17 @@
sys.path.insert(0, str(CONF_DIR.parent.parent.joinpath("devel-common", "src", "sphinx_exts").resolve()))
sys.path.insert(0, str(CONF_DIR.parent.joinpath("src").resolve()))

PACKAGE_NAME = "task-sdk"
os.environ["AIRFLOW_PACKAGE_NAME"] = PACKAGE_NAME

PACKAGE_VERSION = airflow.sdk.__version__

project = "Apache Airflow Task SDK"
# # The version info for the project you're documenting
version = PACKAGE_VERSION
# The full version, including alpha/beta/rc tags.
release = PACKAGE_VERSION


language = "en"
locale_dirs: list[str] = []
Expand Down