ashb commented on code in PR #51153: URL: https://github.com/apache/airflow/pull/51153#discussion_r2123220264
########## task-sdk/docs/index.rst: ########## @@ -0,0 +1,161 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + .. http://www.apache.org/licenses/LICENSE-2.0 + + .. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Apache Airflow Task Execution SDK +================================= + +:any:`DAG` is where to start. :any:`dag` + +The Apache Airflow Task Execution SDK(Task SDK) provides Python-native interfaces for defining DAGs (via decorators), +executing tasks in isolated subprocesses and interacting with Airflow resources +(e.g., Connections, Variables, XComs, Metrics, Logs, and OpenLineage events) at runtime. +It also includes core execution-time components to manage communication between the worker +and the Airflow scheduler/backend. + +This approach minimises boilerplate and keeps your DAG definitions concise and readable. + + +Installation +------------ +To install the Task SDK, run: + +.. code-block:: bash + + pip install apache-airflow-task-sdk + +Getting Started +--------------- +Define a basic DAG and task in just a few lines of Python: + +.. literalinclude:: ../../airflow-core/src/airflow/example_dags/example_simplest_dag.py + :language: python + :start-after: [START simplest_dag] + :end-before: [END simplest_dag] + :caption: Simplest DAG with ``@dag`` and ``@task`` Review Comment: Can we make these links? ```suggestion :caption: Simplest DAG with :func:`@dag <airflow.sdk.dag>` and :func:`@task <airflow.sdk.task>` ``` ########## task-sdk/docs/index.rst: ########## @@ -0,0 +1,161 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + .. http://www.apache.org/licenses/LICENSE-2.0 + + .. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Apache Airflow Task Execution SDK +================================= + +:any:`DAG` is where to start. :any:`dag` + +The Apache Airflow Task Execution SDK(Task SDK) provides Python-native interfaces for defining DAGs (via decorators), +executing tasks in isolated subprocesses and interacting with Airflow resources +(e.g., Connections, Variables, XComs, Metrics, Logs, and OpenLineage events) at runtime. +It also includes core execution-time components to manage communication between the worker +and the Airflow scheduler/backend. + +This approach minimises boilerplate and keeps your DAG definitions concise and readable. + + +Installation +------------ +To install the Task SDK, run: + +.. code-block:: bash + + pip install apache-airflow-task-sdk + +Getting Started +--------------- +Define a basic DAG and task in just a few lines of Python: + +.. literalinclude:: ../../airflow-core/src/airflow/example_dags/example_simplest_dag.py + :language: python + :start-after: [START simplest_dag] + :end-before: [END simplest_dag] + :caption: Simplest DAG with ``@dag`` and ``@task`` + +Key Concepts +------------ +Defining DAGs +~~~~~~~~~~~~~ +Use ``@dag`` to convert a function into an Airflow DAG. All nested ``@task`` calls +become part of the workflow. + +.. literalinclude:: ../../airflow-core/src/airflow/example_dags/example_dag_decorator.py + :language: python + :start-after: [START dag_decorator_usage] + :end-before: [END dag_decorator_usage] + :caption: Using the ``@dag`` decorator with custom tasks and operators. Review Comment: Ditto here -- link please ########## task-sdk/docs/index.rst: ########## @@ -0,0 +1,161 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + .. http://www.apache.org/licenses/LICENSE-2.0 + + .. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Apache Airflow Task Execution SDK +================================= + +:any:`DAG` is where to start. :any:`dag` + +The Apache Airflow Task Execution SDK(Task SDK) provides Python-native interfaces for defining DAGs (via decorators), +executing tasks in isolated subprocesses and interacting with Airflow resources +(e.g., Connections, Variables, XComs, Metrics, Logs, and OpenLineage events) at runtime. +It also includes core execution-time components to manage communication between the worker +and the Airflow scheduler/backend. + +This approach minimises boilerplate and keeps your DAG definitions concise and readable. + + +Installation +------------ +To install the Task SDK, run: + +.. code-block:: bash + + pip install apache-airflow-task-sdk + +Getting Started +--------------- +Define a basic DAG and task in just a few lines of Python: + +.. literalinclude:: ../../airflow-core/src/airflow/example_dags/example_simplest_dag.py + :language: python + :start-after: [START simplest_dag] + :end-before: [END simplest_dag] + :caption: Simplest DAG with ``@dag`` and ``@task`` + +Key Concepts +------------ +Defining DAGs +~~~~~~~~~~~~~ +Use ``@dag`` to convert a function into an Airflow DAG. All nested ``@task`` calls Review Comment: These ones probably don't need to be links, so should stay as they are. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
