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
6 changes: 3 additions & 3 deletions airflow-core/docs/tutorial/taskflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ system-level packages. TaskFlow supports multiple execution environments to isol
Creates a temporary virtualenv at task runtime. Great for experimental or dynamic tasks, but may have cold start
overhead.

.. exampleinclude:: /../../providers/standard/tests/system/standard/example_python_decorator.py
.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags//example_python_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_operator_python_venv]
Expand All @@ -284,7 +284,7 @@ overhead.

Executes the task using a pre-installed Python interpreter — ideal for consistent environments or shared virtualenvs.

.. exampleinclude:: /../../providers/standard/tests/system/standard/example_python_decorator.py
.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags//example_python_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_operator_external_python]
Expand Down Expand Up @@ -334,7 +334,7 @@ Using Sensors
Use ``@task.sensor`` to build lightweight, reusable sensors using Python functions. These support both poke and reschedule
modes.

.. exampleinclude:: /../../providers/standard/tests/system/standard/example_sensor_decorator.py
.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags//example_sensor_decorator.py
:language: python
:start-after: [START tutorial]
:end-before: [END tutorial]
Expand Down
2 changes: 1 addition & 1 deletion airflow-core/src/airflow/example_dags/standard
11 changes: 10 additions & 1 deletion airflow-core/tests/unit/jobs/test_scheduler_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,16 @@
ELASTIC_DAG_FILE = os.path.join(PERF_DAGS_FOLDER, "elastic_dag.py")

TEST_DAG_FOLDER = os.environ["AIRFLOW__CORE__DAGS_FOLDER"]
EXAMPLE_STANDARD_DAGS_FOLDER = AIRFLOW_ROOT_PATH / "providers" / "standard" / "tests" / "system" / "standard"
EXAMPLE_STANDARD_DAGS_FOLDER = (
AIRFLOW_ROOT_PATH
/ "providers"
/ "standard"
/ "src"
/ "airflow"
/ "providers"
/ "standard"
/ "example_dags"
)
DEFAULT_DATE = timezone.datetime(2016, 1, 1)
DEFAULT_LOGICAL_DATE = timezone.coerce_datetime(DEFAULT_DATE)
TRY_NUMBER = 1
Expand Down
10 changes: 4 additions & 6 deletions devel-common/src/docs/provider_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
get_html_theme_options,
get_intersphinx_mapping,
get_rst_epilogue,
get_rst_filepath_from_path,
)
from sphinx_exts.provider_yaml_utils import load_package_data

Expand Down Expand Up @@ -162,10 +161,10 @@
*[f"_api/tests/system/{subpackage}/index.rst" for subpackage in empty_subpackages],
]

exclude_patterns.extend(
get_rst_filepath_from_path(f, AIRFLOW_REPO_ROOT_PATH)
for f in BASE_PROVIDER_SRC_PATH.rglob("example_dags")
)
# exclude_patterns.extend(
# get_rst_filepath_from_path(f, AIRFLOW_REPO_ROOT_PATH)
# for f in BASE_PROVIDER_SRC_PATH.rglob("example_dags")
# )

# Add any paths that contain templates here, relative to this directory.
templates_path = ["templates"]
Expand Down Expand Up @@ -297,7 +296,6 @@
(
"*/airflow/__init__.py",
"*/airflow/providers/__init__.py",
"*/example_dags/*",
"*/providers/__init__.py",
"*/conf/*",
)
Expand Down
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,7 @@ pluggable
pluggy
plyvel
png
PoC
PodManager
podName
PodSpec
Expand Down
8 changes: 1 addition & 7 deletions providers/arangodb/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/providers-arangodb/|version|/airflow/providers/arangodb/example_dags>

.. toctree::
:hidden:
:maxdepth: 1
:caption: Resources

Example DAGs <_api/airflow/providers/arangodb/example_dags/index>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-arangodb/>
Installing from sources <installing-providers-from-sources>

Expand Down
2 changes: 1 addition & 1 deletion providers/edge3/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/providers-edge3/|version|/providers/edge3/src/airflow/providers/edge3/example_dags>
Example DAGs <_api/airflow/providers/edge3/example_dags/index>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-edge3/>
Installing from sources <installing-providers-from-sources>

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


class NotepadOperator(BaseOperator):
"""Example Operator Implementation which starts a Notepod.exe on WIndows."""
"""Example Operator Implementation which starts a ``Notepad.exe`` on Windows."""

template_fields: Sequence[str] = "text"

Expand Down
2 changes: 1 addition & 1 deletion providers/oracle/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/providers-oracle/|version|/airflow/providers/oracle/example_dags>
Example DAGs <_api/airflow/providers/oracle/example_dags/index>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-oracle/>
Installing from sources <installing-providers-from-sources>

Expand Down
9 changes: 1 addition & 8 deletions providers/standard/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,12 @@
Sensors <sensors/index>
Configuration <configurations-ref>

.. toctree::
:hidden:
:maxdepth: 1
:caption: System tests

System Tests <_api/tests/system/standard/index>

.. toctree::
:hidden:
:maxdepth: 1
:caption: Resources

Example DAGs <https://github.com/apache/airflow/tree/providers-standard/|version|/providers/standard/tests/system/standard>
Example DAGs <_api/airflow/providers/standard/example_dags/index>
PyPI Repository <https://pypi.org/project/apache-airflow-providers-standard/>
Installing from sources <installing-providers-from-sources>
Python API <_api/airflow/providers/standard/index>
Expand Down
18 changes: 9 additions & 9 deletions providers/standard/docs/operators/bash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ determined by:
.. tab-item:: @task.bash
:sync: taskflow

.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_decorator_bash]
Expand All @@ -50,7 +50,7 @@ determined by:
.. tab-item:: BashOperator
:sync: operator

.. exampleinclude:: /../tests/system/standard/example_bash_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_operator.py
:language: python
:dedent: 4
:start-after: [START howto_operator_bash]
Expand All @@ -67,7 +67,7 @@ You can use :ref:`Jinja templates <concepts:jinja-templating>` to parameterize t
.. tab-item:: @task.bash
:sync: taskflow

.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_decorator_bash_template]
Expand All @@ -76,7 +76,7 @@ You can use :ref:`Jinja templates <concepts:jinja-templating>` to parameterize t
.. tab-item:: BashOperator
:sync: operator

.. exampleinclude:: /../tests/system/standard/example_bash_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_operator.py
:language: python
:dedent: 4
:start-after: [START howto_operator_bash_template]
Expand All @@ -85,7 +85,7 @@ You can use :ref:`Jinja templates <concepts:jinja-templating>` to parameterize t
Using the ``@task.bash`` TaskFlow decorator allows you to return a formatted string and take advantage of
having all :ref:`execution context variables directly accessible to decorated tasks <taskflow/accessing_context_variables>`.

.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_decorator_bash_context_vars]
Expand Down Expand Up @@ -169,7 +169,7 @@ exit code if you pass ``skip_on_exit_code``).
.. tab-item:: @task.bash
:sync: taskflow

.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_decorator_bash_skip]
Expand All @@ -178,7 +178,7 @@ exit code if you pass ``skip_on_exit_code``).
.. tab-item:: BashOperator
:sync: operator

.. exampleinclude:: /../tests/system/standard/example_bash_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_operator.py
:language: python
:start-after: [START howto_operator_bash_skip]
:end-before: [END howto_operator_bash_skip]
Expand Down Expand Up @@ -388,15 +388,15 @@ or even build the Bash command(s) to execute.

For example, use conditional logic to determine task behavior:

.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_decorator_bash_conditional]
:end-before: [END howto_decorator_bash_conditional]

Or call a function to help build a Bash command:

.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
:language: python
:dedent: 4
:start-after: [START howto_decorator_bash_build_cmd]
Expand Down
8 changes: 4 additions & 4 deletions providers/standard/docs/operators/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ take some time between when the DAGRun was scheduled and executed and it might m
the DAGRun was scheduled properly, the actual time used for branching decision will be different than the
schedule time and the branching decision might be different depending on those delays.

.. exampleinclude:: /../tests/system/standard/example_branch_datetime_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
:language: python
:start-after: [START howto_branch_datetime_operator]
:end-before: [END howto_branch_datetime_operator]
Expand All @@ -50,7 +50,7 @@ the current date in order to allow comparisons with it. In the event that ``targ
to a ``datetime.time`` that occurs before the given ``target_lower``, a day will be added to ``target_upper``.
This is done to allow for time periods that span over two dates.

.. exampleinclude:: /../tests/system/standard/example_branch_datetime_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
:language: python
:start-after: [START howto_branch_datetime_operator_next_day]
:end-before: [END howto_branch_datetime_operator_next_day]
Expand All @@ -66,7 +66,7 @@ The usage is much more "data range" friendly. The ``logical_date`` does not chan
it is not affected by execution delays, so this approach is suitable for idempotent DAG runs that might be
back-filled.

.. exampleinclude:: /../tests/system/standard/example_branch_datetime_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
:language: python
:start-after: [START howto_branch_datetime_operator_logical_date]
:end-before: [END howto_branch_datetime_operator_logical_date]
Expand All @@ -78,7 +78,7 @@ BranchDayOfWeekOperator

Use the :class:`~airflow.providers.standard.operators.weekday.BranchDayOfWeekOperator` to branch your workflow based on week day value.

.. exampleinclude:: /../tests/system/standard/example_branch_day_of_week_operator.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
:language: python
:dedent: 4
:start-after: [START howto_operator_day_of_week_branch]
Expand Down
2 changes: 1 addition & 1 deletion providers/standard/docs/operators/latest_only.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LatestOnlyOperator

Use the :class:`~airflow.providers.standard.operators.latest_only.LatestOnlyOperator`.

.. exampleinclude:: /../tests/system/standard/example_latest_only.py
.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_latest_only.py
:language: python
:dedent: 4
:start-after: [START howto_operator_latest_only]
Expand Down
Loading
Loading