You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/09/19 18:48:00 UTC

[jira] [Commented] (AIRFLOW-1441) Tutorial Inconsistencies Between Example Pipeline Definition and Recap

    [ https://issues.apache.org/jira/browse/AIRFLOW-1441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621034#comment-16621034 ] 

ASF GitHub Bot commented on AIRFLOW-1441:
-----------------------------------------

Fokko closed pull request #2466: [AIRFLOW-1441] Fix inconsistent tutorial code
URL: https://github.com/apache/incubator-airflow/pull/2466
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index 1c2dfd69b7..0ea58d2784 100644
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -37,7 +37,7 @@ complicated, a line by line explanation follows below.
         # 'end_date': datetime(2016, 1, 1),
     }
 
-    dag = DAG('tutorial', default_args=default_args)
+    dag = DAG('tutorial', default_args=default_args, schedule_interval=timedelta(days=1))
 
     # t1, t2 and t3 are examples of tasks created by instantiating operators
     t1 = BashOperator(
@@ -147,7 +147,7 @@ define a ``schedule_interval`` of 1 day for the DAG.
 .. code:: python
 
     dag = DAG(
-        'tutorial', default_args=default_args, schedule_interval=timedelta(1))
+        'tutorial', default_args=default_args, schedule_interval=timedelta(days=1))
 
 Tasks
 -----
@@ -277,8 +277,8 @@ something like this:
 .. code:: python
 
     """
-    Code that goes along with the Airflow located at:
-    http://airflow.readthedocs.org/en/latest/tutorial.html
+    Code that goes along with the Airflow tutorial located at:
+    https://github.com/apache/incubator-airflow/blob/master/airflow/example_dags/tutorial.py
     """
     from airflow import DAG
     from airflow.operators.bash_operator import BashOperator
@@ -301,7 +301,7 @@ something like this:
     }
 
     dag = DAG(
-        'tutorial', default_args=default_args, schedule_interval=timedelta(1))
+        'tutorial', default_args=default_args, schedule_interval=timedelta(days=1))
 
     # t1, t2 and t3 are examples of tasks created by instantiating operators
     t1 = BashOperator(


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Tutorial Inconsistencies Between Example Pipeline Definition and Recap
> ----------------------------------------------------------------------
>
>                 Key: AIRFLOW-1441
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1441
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>            Reporter: Trevor Edwards
>            Assignee: Trevor Edwards
>            Priority: Minor
>             Fix For: 1.10.1
>
>
> In the tutorial page, the first view of the code titled "Pipeline Definition" is slightly inconsistent from the Recap, though presumably both should be the same code:
> 1. The initial view says:
> {code}
> Code that goes along with the Airflow tutorial located at:
> https://github.com/airbnb/airflow/blob/master/airflow/example_dags/tutorial.py
> {code}
> While the recap says:
> {code}
> Code that goes along with the Airflow located at:
> http://airflow.readthedocs.org/en/latest/tutorial.html
> {code}
> The first appears to be the correct one (the recap just points back to the same document). Therefore, it would make sense to change the second to match the first.
> 2. The initial view has the line:
> {code}
> dag = DAG('tutorial', default_args=default_args)
> {code}
> While the recap has:
> {code}
> dag = DAG(
>     'tutorial', default_args=default_args, schedule_interval=timedelta(1))
> {code}
> Since the schedule_interval is described in the tutorial, it seems the recap version should be kept here.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)