You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by je...@apache.org on 2022/01/21 00:07:00 UTC
[airflow] 08/23: Doc: Fix incorrect filename references (#20277)
This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit c7256dcac9af524d4f058e60cb2779db8a1ff5dd
Author: Roberto Li <14...@users.noreply.github.com>
AuthorDate: Thu Dec 16 01:11:02 2021 +0100
Doc: Fix incorrect filename references (#20277)
Minor typo corrections. I changed the filenames in the example folder structure instead of the later references to be consistent with the other examples in the documentation.
(cherry picked from commit d11087c22ef509831379fa6730496f3a4d4c9eed)
---
docs/apache-airflow/modules_management.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/apache-airflow/modules_management.rst b/docs/apache-airflow/modules_management.rst
index 8488a58..4bc16f6 100644
--- a/docs/apache-airflow/modules_management.rst
+++ b/docs/apache-airflow/modules_management.rst
@@ -103,8 +103,8 @@ This is an example structure that you might have in your ``dags`` folder:
|
| my_custom_dags
| __init__.py
- | my_dag_1.py
- | my_dag_2.py
+ | my_dag1.py
+ | my_dag2.py
| base_dag.py
In the case above, there are the ways you could import the python files:
@@ -123,7 +123,7 @@ shared code in the other folders, not the actual DAGs).
In the example above the dags are only in ``my_custom_dags`` folder, the ``common_package`` should not be
scanned by scheduler when searching for DAGS, so we should ignore ``common_package`` folder. You also
-want to ignore the ``base_dag`` if you keep a base DAG there that ``my_dag1.py`` and ``my_dag1.py`` derives
+want to ignore the ``base_dag.py`` if you keep a base DAG there that ``my_dag1.py`` and ``my_dag2.py`` derives
from. Your ``.airflowignore`` should look then like this:
.. code-block:: none
@@ -186,7 +186,7 @@ You should import such shared dag using full path (starting from the directory w
The relative imports are counter-intuitive, and depending on how you start your python code, they can behave
differently. In Airflow the same DAG file might be parsed in different contexts (by schedulers, by workers
-or during tests) and in those cases, relatives imports might behave differently. Always use full
+or during tests) and in those cases, relative imports might behave differently. Always use full
python package paths when you import anything in Airflow DAGs, this will save you a lot of troubles.
You can read more about relative import caveats in
`this Stack Overflow thread <https://stackoverflow.com/q/16981921/516701>`_.