Repository: incubator-airflow
Updated Branches:
  refs/heads/master 6f4696ba2 -> abc43c144


[AIRFLOW-121] Documenting dag doc_md feature


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/15056822
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/15056822
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/15056822

Branch: refs/heads/master
Commit: 150568228b6f1321db29b92808945fb4b4cf932b
Parents: 12b542d
Author: Hervé Werner <herve.wer...@mfglabs.com>
Authored: Thu May 12 12:31:38 2016 +0200
Committer: Hervé Werner <herve.wer...@mfglabs.com>
Committed: Tue May 17 09:57:23 2016 +0200

----------------------------------------------------------------------
 docs/concepts.rst | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/15056822/docs/concepts.rst
----------------------------------------------------------------------
diff --git a/docs/concepts.rst b/docs/concepts.rst
index 34e0c33..89a4527 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -642,12 +642,13 @@ may look like inside your ``airflow_settings.py``:
             task.timeout = timedelta(hours=48)
 
 
-Task Documentation & Notes
-==========================
+Documentation & Notes
+=====================
 
-It's possible to add documentation or notes to your task objects that become
-visible in the "Task Details" view in the web interface. There are a set
-of special task attributes that get rendered as rich content if defined:
+It's possible to add documentation or notes to your dags & task objects that
+become visible in the web interface ("Graph View" for dags, "Task Details" for
+tasks). There are a set of special task attributes that get rendered as rich
+content if defined:
 
 ==========  ================
 attribute   rendered to
@@ -659,11 +660,19 @@ doc_md      markdown
 doc_rst     reStructuredText
 ==========  ================
 
+Please note that for dags, dag_md is the only attribute interpreted.
+
 This is especially useful if your tasks are built dynamically from
 configuration files, it allows you to expose the configuration that led
 to the related tasks in Airflow.
 
 .. code:: python
+    """
+    ### My great DAG
+    """
+
+    dag = DAG('my_dag', default_args=default_args)
+    dag.doc_md = __doc__
 
     t = BashOperator("foo", dag=dag)
     t.doc_md = """\
@@ -671,7 +680,8 @@ to the related tasks in Airflow.
     Here's a [url](www.airbnb.com)
     """
 
-This content will get rendered as markdown in the "Task Details" page.
+This content will get rendered as markdown respectively in the "Graph View" and
+"Task Details" pages.
 
 Jinja Templating
 ================

Reply via email to