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

Sphinx template for no inheritance can set missing rubric #2329

Open
Eric-Arellano opened this issue Nov 15, 2024 · 1 comment
Open

Sphinx template for no inheritance can set missing rubric #2329

Eric-Arellano opened this issue Nov 15, 2024 · 1 comment

Comments

@Eric-Arellano
Copy link
Collaborator

From #2328, we have some pages like this:

Image

This happens because of this config

{% block attributes_summary %}
  {% if attributes %}
   .. rubric:: Attributes
    {% for item in attributes %}
      {%- if item not in inherited_members %}
   .. autoattribute:: {{ item }}
      {%- endif -%}
    {%- endfor %}
  {% endif %}
{% endblock -%}

We set if attributes, but it is checking any attributes rather than only inherited attributes. We need to only set .. rubric:: Attributes if there are inherited members.

This fix belongs in the Sphinx template in qiskit-addon-mpf. Also update Qiskit SDK, which is the only other repo with this template.

@Eric-Arellano
Copy link
Collaborator Author

Fixed by Qiskit/qiskit-addon-mpf@9e5bf55. I want to apply this change to Qiskit SDK before closing this.

I also want to ensure Qiskit SDK, qiskit-ibm-runtime, and qiskit-ibm-transpiler are using the Sphinx improvements made to the addons with the below

autodoc_default_options = {
    "inherited-members": None,
}
autodoc_typehints_description_target = "all"

@Eric-Arellano Eric-Arellano self-assigned this Nov 15, 2024
@Eric-Arellano Eric-Arellano moved this to In Progress in Docs Planning Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant