Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Repair incorrect display of the deferrable operators in the documentation #36476

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}