This is an automated email from the ASF dual-hosted git repository. uranusjr pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new c44e5b5ccc Add state utils to Public Airflow Interface (#34059) c44e5b5ccc is described below commit c44e5b5ccc439fbe9a50afcb3d12c6a335518bb3 Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Mon Sep 4 05:18:30 2023 +0200 Add state utils to Public Airflow Interface (#34059) --- airflow/utils/state.py | 2 +- docs/apache-airflow/public-airflow-interface.rst | 10 ++++++++++ docs/conf.py | 6 ++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/airflow/utils/state.py b/airflow/utils/state.py index da5381215d..32219edb73 100644 --- a/airflow/utils/state.py +++ b/airflow/utils/state.py @@ -80,7 +80,7 @@ class DagRunState(str, Enum): class State: - """Static class with task instance state constants and color methods to avoid hardcoding.""" + """Static class with task instance state constants and color methods to avoid hard-coding.""" # Backwards-compat constants for code that does not yet use the enum # These first three are shared by DagState and TaskState diff --git a/docs/apache-airflow/public-airflow-interface.rst b/docs/apache-airflow/public-airflow-interface.rst index e63ac8fdca..248d46472f 100644 --- a/docs/apache-airflow/public-airflow-interface.rst +++ b/docs/apache-airflow/public-airflow-interface.rst @@ -222,6 +222,16 @@ exposes: _api/airflow/exceptions/index +Public Utility classes +---------------------- + +.. toctree:: + :includehidden: + :glob: + :maxdepth: 1 + + _api/airflow/utils/state/index + Using Public Interface to extend Airflow capabilities ===================================================== diff --git a/docs/conf.py b/docs/conf.py index 5a1e9c6f5a..e9af597525 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -236,7 +236,9 @@ if PACKAGE_NAME == "apache-airflow": "triggers", "utils", } - browsable_utils: set[str] = set() + browsable_utils: set[str] = { + "state.py", + } models_included: set[str] = { "baseoperator.py", @@ -257,7 +259,7 @@ if PACKAGE_NAME == "apache-airflow": if path.is_dir() and path.name not in browsable_packages: exclude_patterns.append(f"_api/airflow/{path.name}") - # Don't include all of utils, just the specific ones we decoded to include + # Don't include all of utils, just the specific ones we decided to include for path in (root / "utils").iterdir(): if path.name not in browsable_utils: exclude_patterns.append(_get_rst_filepath_from_path(path))