Add an Apache Incubator Disclaimer and mocking modules Closes #1634 from mistercrunch/mock_docs
Adding an Apache Incubator Disclaimer and mocking modules Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/27d2d4c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/27d2d4c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/27d2d4c7 Branch: refs/heads/branch-1.7.2-apache Commit: 27d2d4c79c32cb6c19e19e7b9362732a0792aaca Parents: 15f710f Author: Maxime Beauchemin <[email protected]> Authored: Wed Jun 29 13:39:15 2016 -0700 Committer: Bolke de Bruin <[email protected]> Committed: Mon Jul 11 15:54:30 2016 +0200 ---------------------------------------------------------------------- airflow/models.py | 4 ++-- docs/code.rst | 19 ++++++++++--------- docs/concepts.rst | 6 ++++++ docs/conf.py | 15 +++++++++++++++ docs/index.rst | 15 +++++++++++++-- setup.py | 7 ++++--- 6 files changed, 50 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/27d2d4c7/airflow/models.py ---------------------------------------------------------------------- diff --git a/airflow/models.py b/airflow/models.py index 3bad273..b60a7a8 100644 --- a/airflow/models.py +++ b/airflow/models.py @@ -780,8 +780,8 @@ class TaskInstance(Base): Refreshes the task instance from the database based on the primary key :param lock_for_update: if True, indicates that the database should - lock the TaskInstance (issuing a FOR UPDATE clause) until the session - is committed. + lock the TaskInstance (issuing a FOR UPDATE clause) until the + session is committed. """ TI = TaskInstance http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/27d2d4c7/docs/code.rst ---------------------------------------------------------------------- diff --git a/docs/code.rst b/docs/code.rst index 3bec3d7..c693b07 100644 --- a/docs/code.rst +++ b/docs/code.rst @@ -89,15 +89,17 @@ Community-contributed Operators .. automodule:: airflow.contrib.operators :show-inheritance: :members: - BigQueryOperator, - BigQueryToCloudStorageOperator, - GoogleCloudStorageDownloadOperator, - HipChatAPIOperator, - HipChatAPISendRoomNotificationOperator, SSHExecuteOperator, VerticaOperator, VerticaToHiveTransfer +.. autoclass:: airflow.contrib.operators.bigquery_operator.BigQueryOperator +.. autoclass:: airflow.contrib.operators.bigquery_to_gcs.BigQueryToCloudStorageOperator +.. autoclass:: airflow.contrib.operators.gcs_download_operator.GoogleCloudStorageDownloadOperator +.. autoclass:: airflow.contrib.operators.QuboleOperator +.. autoclass:: airflow.contrib.operators.hipchat_operator.HipChatAPIOperator +.. autoclass:: airflow.contrib.operators.hipchat_operator.HipChatAPISendRoomNotificationOperator + .. _macros: Macros @@ -223,6 +225,8 @@ Community contributed hooks SSHHook, CloudantHook +.. autoclass:: airflow.contrib.hooks.gcs_hook.GoogleCloudStorageHook + Executors --------- Executors are the mechanism by which task instances get run. @@ -234,7 +238,4 @@ Executors are the mechanism by which task instances get run. Community-contributed executors ''''''''''''''''''''''''''''''' -.. automodule:: airflow.contrib.executors - :show-inheritance: - :members: - MesosExecutor +.. autoclass:: airflow.contrib.executors.mesos_executor.MesosExecutor http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/27d2d4c7/docs/concepts.rst ---------------------------------------------------------------------- diff --git a/docs/concepts.rst b/docs/concepts.rst index 34e0c33..9a15175 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -664,6 +664,12 @@ 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 = """\ http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/27d2d4c7/docs/conf.py ---------------------------------------------------------------------- diff --git a/docs/conf.py b/docs/conf.py index b0b5195..c462847 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,21 @@ # serve to show the default. import os import sys +import mock + +MOCK_MODULES = [ + 'apiclient', + 'apiclient.discovery', + 'apiclient.http', + 'mesos', + 'mesos.interface', + 'mesos.native', + 'oauth2client.service_account', + 'pandas.io.gbq', +] +for mod_name in MOCK_MODULES: + sys.modules[mod_name] = mock.Mock() + # Hack to allow changing for piece of the code to behave differently while # the docs are being built. The main objective was to alter the http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/27d2d4c7/docs/index.rst ---------------------------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 70f9355..c98d619 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,7 +5,19 @@ :width: 150 Apache Airflow (incubating) Documentation -================================ +========================================= + +.. note :: + + Apache Airflow is an effort undergoing incubation at The Apache + Software Foundation (ASF), sponsored by Chris Riccomini. + Incubation is required of all newly accepted projects until a further + review indicates that the infrastructure, communications, and + decision making process have stabilized in a manner consistent with + other successful ASF projects. While incubation status is not + necessarily a reflection of the completeness or stability of + the code, it does indicate that the project has yet to be fully + endorsed by the ASF. Airflow is a platform to programmatically author, schedule and monitor workflows. @@ -20,7 +32,6 @@ monitor progress, and troubleshoot issues when needed. When workflows are defined as code, they become more maintainable, versionable, testable, and collaborative. ------------- .. image:: img/airflow.gif http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/27d2d4c7/setup.py ---------------------------------------------------------------------- diff --git a/setup.py b/setup.py index 69aecc3..279285c 100644 --- a/setup.py +++ b/setup.py @@ -190,9 +190,10 @@ def do_setup(): url='https://github.com/apache/incubator-airflow', download_url=( 'https://github.com/apache/incubator-airflow/tarball/' + version), - cmdclass={'test': Tox, - 'extra_clean': CleanCommand, - }, + cmdclass={ + 'test': Tox, + 'extra_clean': CleanCommand, + }, )
