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 detection of module metadata with API generation #221

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

Eric-Arellano
Copy link
Collaborator

In Qiskit docs, which use an older version of Sphinx, the module ID is set with HTML like this:

<span class="target" id="module-qiskit.circuit">
               <span id="qiskit-circuit"></span>
             </span>

But in Runtime with Sphinx 7.2, it is set like this, without the .target class:

<span id="module-qiskit_ibm_runtime.options"></span>

So, we were failing to set metadata for modules, which caused those files to not have "front matter" (Markdown metadata) and to not show up in the TOC. See #67.

Note that we still look at section to determine the module metadata, too. There continue to be some pages in IBM Provider that set their module metadata that way.

Copy link
Collaborator

@javabster javabster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 nice tests!

@Eric-Arellano Eric-Arellano merged commit 00d462f into main Oct 20, 2023
3 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/fix-module-metadata branch October 20, 2023 20:37
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
In Qiskit docs, which use an older version of Sphinx, the module ID is
set with HTML like this:

```html
<span class="target" id="module-qiskit.circuit">
               <span id="qiskit-circuit"></span>
             </span>
```

But in Runtime with Sphinx 7.2, it is set like this, without the
`.target` class:

```html
<span id="module-qiskit_ibm_runtime.options"></span>
```

So, we were failing to set metadata for modules, which caused those
files to not have "front matter" (Markdown metadata) and to not show up
in the TOC. See Qiskit#67.

Note that we still look at `section` to determine the module metadata,
too. There continue to be some pages in IBM Provider that set their
module metadata that way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants