wwlian commented on a change in pull request #4980: [AIRFLOW-3971] Add Google 
Cloud Natural Language operators
URL: https://github.com/apache/airflow/pull/4980#discussion_r270519489
 
 

 ##########
 File path: docs/code.rst
 ##########
 @@ -0,0 +1,574 @@
+..  Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+..    http://www.apache.org/licenses/LICENSE-2.0
+
+..  Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+API Reference
+=============
+
+.. _api-reference-operators:
+
+Operators
+---------
+Operators allow for generation of certain types of tasks that become nodes in
+the DAG when instantiated. All operators derive from ``BaseOperator`` and
+inherit many attributes and methods that way. Refer to the BaseOperator_
+documentation for more details.
+
+There are 3 main types of operators:
+
+- Operators that performs an **action**, or tell another system to
+  perform an action
+- **Transfer** operators move data from one system to another
+- **Sensors** are a certain type of operator that will keep running until a
+  certain criterion is met. Examples include a specific file landing in HDFS or
+  S3, a partition appearing in Hive, or a specific time of the day. Sensors
+  are derived from ``BaseSensorOperator`` and run a poke
+  method at a specified ``poke_interval`` until it returns ``True``.
+
+BaseOperator
+''''''''''''
+All operators are derived from ``BaseOperator`` and acquire much
+functionality through inheritance. Since this is the core of the engine,
+it's worth taking the time to understand the parameters of ``BaseOperator``
+to understand the primitive features that can be leveraged in your
+DAGs.
+
+
+.. autoclass:: airflow.models.BaseOperator
+
+
+BaseSensorOperator
+'''''''''''''''''''
+All sensors are derived from ``BaseSensorOperator``. All sensors inherit
+the ``timeout`` and ``poke_interval`` on top of the ``BaseOperator``
+attributes.
+
+.. autoclass:: airflow.sensors.base_sensor_operator.BaseSensorOperator
+
+
+Core Operators
+''''''''''''''
+
+Operators
+^^^^^^^^^
+
+.. autoclass:: airflow.operators.bash_operator.BashOperator
 
 Review comment:
   I'm not sure if this is just a rendering problem during review, but all of 
these autoclass:: entries don't seem to be rendering correctly for me here:
   
https://github.com/apache/airflow/blob/b66ea5b2a1dd87572e2ac5626fce9ea164bd8097/docs/code.rst
   
   They just show up as text literals in a code-style text box.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


With regards,
Apache Git Services

Reply via email to