[jira] [Commented] (AIRFLOW-2864) Incorrect docstrings for SubDagOperator

2018-08-07 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on AIRFLOW-2864:
--

Commit b74a7122d2e24d0a24508f6b5c710456a9d11740 in incubator-airflow's branch 
refs/heads/master from [~kaxilnaik]
[ https://gitbox.apache.org/repos/asf?p=incubator-airflow.git;h=b74a712 ]

[AIRFLOW-2864] Fix docstrings for SubDagOperator (#3712)

The docstrings are currently in the `__init__` method, due to which they are 
not automatically shown in the Sphinx documentation.

> Incorrect docstrings for SubDagOperator
> ---
>
> Key: AIRFLOW-2864
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2864
> Project: Apache Airflow
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Kaxil Naik
>Assignee: Kaxil Naik
>Priority: Minor
> Fix For: 2.0.0
>
> Attachments: image-2018-08-07-14-55-10-275.png
>
>
> The docstrings are currently in the __init__ method, due to which they are 
> not automatically shown in the Sphinx documentation.
>  !image-2018-08-07-14-55-10-275.png! 



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


[jira] [Commented] (AIRFLOW-2864) Incorrect docstrings for SubDagOperator

2018-08-07 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AIRFLOW-2864:
-

kaxil closed pull request #3712: [AIRFLOW-2864] Fix docstrings for 
SubDagOperator
URL: https://github.com/apache/incubator-airflow/pull/3712
 
 
   

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/airflow/operators/subdag_operator.py 
b/airflow/operators/subdag_operator.py
index 052095e2a6..90f17fcf6a 100644
--- a/airflow/operators/subdag_operator.py
+++ b/airflow/operators/subdag_operator.py
@@ -25,6 +25,18 @@
 
 
 class SubDagOperator(BaseOperator):
+"""
+This runs a sub dag. By convention, a sub dag's dag_id
+should be prefixed by its parent and a dot. As in `parent.child`.
+
+:param subdag: the DAG object to run as a subdag of the current DAG.
+:type subdag: airflow.DAG.
+:param dag: the parent DAG for the subdag.
+:type dag: airflow.DAG.
+:param executor: the executor for this subdag. Default to use 
SequentialExecutor.
+Please find AIRFLOW-74 for more details.
+:type executor: airflow.executors.
+"""
 
 template_fields = tuple()
 ui_color = '#555'
@@ -37,18 +49,6 @@ def __init__(
 subdag,
 executor=SequentialExecutor(),
 *args, **kwargs):
-"""
-This runs a sub dag. By convention, a sub dag's dag_id
-should be prefixed by its parent and a dot. As in `parent.child`.
-
-:param subdag: the DAG object to run as a subdag of the current DAG.
-:type subdag: airflow.DAG.
-:param dag: the parent DAG for the subdag.
-:type dag: airflow.DAG.
-:param executor: the executor for this subdag. Default to use 
SequentialExecutor.
- Please find AIRFLOW-74 for more details.
-:type executor: airflow.executors.
-"""
 import airflow.models
 dag = kwargs.get('dag') or airflow.models._CONTEXT_MANAGER_DAG
 if not dag:


 


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:
us...@infra.apache.org


> Incorrect docstrings for SubDagOperator
> ---
>
> Key: AIRFLOW-2864
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2864
> Project: Apache Airflow
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Kaxil Naik
>Assignee: Kaxil Naik
>Priority: Minor
> Fix For: 2.0.0
>
> Attachments: image-2018-08-07-14-55-10-275.png
>
>
> The docstrings are currently in the __init__ method, due to which they are 
> not automatically shown in the Sphinx documentation.
>  !image-2018-08-07-14-55-10-275.png! 



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


[jira] [Commented] (AIRFLOW-2864) Incorrect docstrings for SubDagOperator

2018-08-07 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on AIRFLOW-2864:
-

kaxil opened a new pull request #3712: [AIRFLOW-2864] Fix docstrings for 
SubDagOperator
URL: https://github.com/apache/incubator-airflow/pull/3712
 
 
   
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [x] My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references 
them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
 - https://issues.apache.org/jira/browse/AIRFLOW-2864
 - In case you are fixing a typo in the documentation you can prepend your 
commit with \[AIRFLOW-XXX\], code changes always need a Jira issue.
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI 
changes:
   The docstrings are currently in the `__init__` method, due to which they are 
not automatically shown in the Sphinx documentation.
   
   
![image](https://user-images.githubusercontent.com/8811558/43780360-4da564e0-9a52-11e8-9912-3821a0d63a04.png)
   
   
   ### Tests
   
   - [x] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason:
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines, and I 
have squashed multiple commits if they address the same issue. In addition, my 
commits follow the guidelines from "[How to write a good git commit 
message](http://chris.beams.io/posts/git-commit/)":
 1. Subject is separated from body by a blank line
 1. Subject is limited to 50 characters (not including Jira issue reference)
 1. Subject does not end with a period
 1. Subject uses the imperative mood ("add", not "adding")
 1. Body wraps at 72 characters
 1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [x] In case of new functionality, my PR adds documentation that describes 
how to use it.
 - When adding new operators/hooks/sensors, the autoclass documentation 
generation needs to be added.
   
   ### Code Quality
   
   - [x] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
   


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:
us...@infra.apache.org


> Incorrect docstrings for SubDagOperator
> ---
>
> Key: AIRFLOW-2864
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2864
> Project: Apache Airflow
>  Issue Type: Improvement
>  Components: Documentation
>Reporter: Kaxil Naik
>Assignee: Kaxil Naik
>Priority: Minor
> Fix For: 2.0.0
>
> Attachments: image-2018-08-07-14-55-10-275.png
>
>
> The docstrings are currently in the __init__ method, due to which they are 
> not automatically shown in the Sphinx documentation.
>  !image-2018-08-07-14-55-10-275.png! 



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