Skip to content

Commit

Permalink
Link to every module in API index page (#1649)
Browse files Browse the repository at this point in the history
Before, `qiskit_ibm_runtime.transpiler.passes.scheduling` was autogenerated by `autosummary` rather than being manually created like we normally do in `apidocs/`. This had two issues:

1. The module does not show up in the API index page https://docs.quantum.ibm.com/api/qiskit-ibm-runtime, even though it shows up as top-level in the doc app's left table of contents
2. The header hierarchy is messed up due to an autosummary quirk that I could not figure out Qiskit/documentation#1272

Using a dedicated page fixes both of these problems.

I named the file `qiskit_ibm_runtime.transpiler.passes.scheduling.rst` to preserve the previous URL we had for the module. (Technically, Sphinx now puts the HTML file in the `apidocs/` folder rather than `stubs/`, but the docs app doesn't care.)

This PR also removes the override of the `module.rst` template. We shouldn't end up using it anymore. Regardless, our version is out-of-date compared with the default and we didn't have any substantial changes.
  • Loading branch information
Eric-Arellano committed May 2, 2024
1 parent 60b894c commit b612ba6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 48 deletions.
41 changes: 0 additions & 41 deletions docs/_templates/autosummary/module.rst

This file was deleted.

5 changes: 3 additions & 2 deletions docs/apidocs/ibm-runtime.rst → docs/apidocs/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.. vale off
*****************************************
********************************
qiskit-ibm-runtime API reference
*****************************************
********************************

.. toctree::
:maxdepth: 1

runtime_service
options
transpiler
qiskit_ibm_runtime.transpiler.passes.scheduling
fake_provider
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. automodule:: qiskit_ibm_runtime.transpiler.passes.scheduling
:no-members:
:no-inherited-members:
:no-special-members:
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ https://github.com/Qiskit/documentation.
:hidden:
:caption: Reference

API Reference <apidocs/ibm-runtime>
API Reference <apidocs/index>
Release Notes <release_notes>

.. Hiding - Indices and tables
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_runtime/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
:toctree: ../stubs/
ConvertIdToDelay
scheduling
See :mod:`qiskit_ibm_runtime.transpiler.passes.scheduling` for a collection of scheduling passes.
"""

from .basis import ConvertIdToDelay
Expand Down
6 changes: 3 additions & 3 deletions qiskit_ibm_runtime/transpiler/passes/scheduling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# that they have been altered from the originals.

"""
====================================================================
Scheduling (:mod:`qiskit_ibm_runtime.transpiler.passes.scheduling`)
====================================================================
=====================================================================================
Transpiler scheduling passes (:mod:`qiskit_ibm_runtime.transpiler.passes.scheduling`)
=====================================================================================
.. currentmodule:: qiskit_ibm_runtime.transpiler.passes.scheduling
Expand Down

0 comments on commit b612ba6

Please sign in to comment.