Skip to content

Detect automatically the lack of reference to the guide in the operator descriptions #8894

@mik-laj

Description

@mik-laj

Hello,

We have a lot of guides that are fantastic.
https://airflow.readthedocs.io/en/latest/howto/operator/index.html
https://airflow.readthedocs.io/en/latest/howto/operator/gcp/index.html
However, not every person may be aware that they exist. In order to promote them, we add a reference in the class description to the guide.
Screenshot 2020-05-17 at 20 07 41
Finding operators that have a guide is simple and can be based on the text pattern search.

find . -type f -name '*.rst' | xargs cat  | grep '.. _howto/operator:' | sort

In the next step we should find the operator and check the class description for reference to the guide

>>> from airflow.operators import python
>>> ':ref:`howto/operator:PythonOperator`' in python.PythonOperator.__doc__

This test should be added to the codebase::

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions