Skip to content

Commit

Permalink
fix: Repair defferable operator list in docs (#36476)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7cd326c)
  • Loading branch information
kacpermuda authored and ephraimbuddy committed Jan 11, 2024
1 parent 808ed02 commit ca1534b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion docs/exts/operators_and_hooks_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,16 @@ def _render_deferrable_operator_content(*, header_separator: str):
)

if provider_info["operators"]:
provider_info["operators"] = sorted(provider_info["operators"])
provider_yaml_content = yaml.safe_load(Path(provider_yaml_path).read_text())
provider_info["name"] = provider_yaml_content["package-name"]
providers.append(provider_info)
return _render_template("deferrable_operators_list.rst.jinja2", providers=providers)

return _render_template(
"deferrable_operators_list.rst.jinja2",
providers=sorted(providers, key=lambda p: p["name"]),
header_separator=header_separator,
)


class BaseJinjaReferenceDirective(Directive):
Expand Down
7 changes: 4 additions & 3 deletions docs/exts/templates/deferrable_operators_list.rst.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
under the License.
#}
{%- for provider in providers %}
**{{ provider["name"] }}**
{{ provider["name"] }}
{{ header_separator * (provider['name']|length) }}

.. list-table::F
.. list-table::
:header-rows: 1

* - Modules
- Operators
{% for module, operator in provider["operators"] %}
* - :mod:`{{ module }}`
- :mod:`{{ operator}}`
- :mod:`{{ operator }}`
{% endfor %}
{% endfor %}

0 comments on commit ca1534b

Please sign in to comment.