Skip to content

Conversation

arnaucasau
Copy link
Collaborator

@arnaucasau arnaucasau commented Dec 22, 2023

The generation script was not inlining all the methods in the class pages because we weren't assigning the correct value to the python_api_name metadata. With this PR, we change the way we search for the id we set as the name in the sphinxHtmlToMarkdown.ts

The problem comes from we are missing the class sig-object in the dt tags we used to extract the python_api_name metadata in the HTML used to generate the markdown API files. We actually don't need to specify the class because the dt tag we are looking for is unique, and this PR fixes that.

Moreover, the changes introduced in #543 are reverted to recover the mergeClassMembers.ts script that we need to inline all the methods in historical versions.

Tested the generation of Qiskit 0.33, where we will inline the methods in a follow-up, and also the generation of Qiskit 0.45 to validate we are not modifying any version that was working previously.

Commands used (Notice we need to have the API docs downloaded in .out):

npm run gen-api -- -p qiskit -v 0.33.0 -a "" --historical
npm run gen-api -- -p qiskit -v 0.45.0 -a ""

Part of #542

@arnaucasau arnaucasau changed the title [WIP - DO NOT MERGE] Inline all methods for Qiskit API Inline all methods for Qiskit API Dec 29, 2023
@arnaucasau arnaucasau marked this pull request as ready for review December 29, 2023 17:52
Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

🙌

@Eric-Arellano Eric-Arellano added this pull request to the merge queue Dec 29, 2023
Merged via the queue into Qiskit:main with commit 9f4fb4f Dec 29, 2023
github-merge-queue bot pushed a commit that referenced this pull request Jan 2, 2024
This will result in the diff in
#558 being more focused.

This also adds missing methods/attributes thanks to @arnaucasau's bug
fix in #552.
github-merge-queue bot pushed a commit that referenced this pull request Jan 2, 2024
This uses the latest builds from the stable/0.14 and stable/0.15
branches. I suspect #552
might explain why 0.14 changed.

```
npm run gen-api -- -p qiskit-ibm-runtime -v 0.14.0 --historical -a https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/6806114640/artifacts/1038218994
npm run gen-api -- -p qiskit-ibm-runtime -v 0.15.0 --historical -a https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/6908950459/artifacts/1058131555
```
github-merge-queue bot pushed a commit that referenced this pull request Jan 5, 2024
Part of #495. We now will
enforce in CI that historical API docs are valid for Runtime and
Provider. To do this, this PR adds the `--skip-broken-historical`
argument.

In a follow up, I want to try checking Qiskit docs, at least certain
versions. But I'm waiting until we regenerate the docs with
#552 applied because I
suspect it will fix some issues.
github-actions bot pushed a commit that referenced this pull request Jan 9, 2024
Part of #495. We now will
enforce in CI that historical API docs are valid for Runtime and
Provider. To do this, this PR adds the `--skip-broken-historical`
argument.

In a follow up, I want to try checking Qiskit docs, at least certain
versions. But I'm waiting until we regenerate the docs with
#552 applied because I
suspect it will fix some issues.
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
The generation script was not inlining all the methods in the class
pages because we weren't assigning the correct value to the
`python_api_name` metadata. With this PR, we change the way we search
for the id we set as the name in the `sphinxHtmlToMarkdown.ts`

The problem comes from we are missing the class `sig-object` in the `dt`
tags we used to extract the `python_api_name` metadata in the HTML used
to generate the markdown API files. We actually don't need to specify
the class because the `dt` tag we are looking for is unique, and this PR
fixes that.

Moreover, the changes introduced in Qiskit#543 are reverted to recover the
mergeClassMembers.ts script that we need to inline all the methods in
historical versions.

Tested the generation of Qiskit 0.33, where we will inline the methods
in a follow-up, and also the generation of Qiskit 0.45 to validate we
are not modifying any version that was working previously.

Commands used (Notice we need to have the API docs downloaded in .out):

> npm run gen-api -- -p qiskit -v 0.33.0 -a "" --historical
> npm run gen-api -- -p qiskit -v 0.45.0 -a ""

Part of Qiskit#542
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
This will result in the diff in
Qiskit#558 being more focused.

This also adds missing methods/attributes thanks to @arnaucasau's bug
fix in Qiskit#552.
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
This uses the latest builds from the stable/0.14 and stable/0.15
branches. I suspect Qiskit#552
might explain why 0.14 changed.

```
npm run gen-api -- -p qiskit-ibm-runtime -v 0.14.0 --historical -a https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/6806114640/artifacts/1038218994
npm run gen-api -- -p qiskit-ibm-runtime -v 0.15.0 --historical -a https://github.com/Qiskit/qiskit-ibm-runtime/actions/runs/6908950459/artifacts/1058131555
```
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
Part of Qiskit#495. We now will
enforce in CI that historical API docs are valid for Runtime and
Provider. To do this, this PR adds the `--skip-broken-historical`
argument.

In a follow up, I want to try checking Qiskit docs, at least certain
versions. But I'm waiting until we regenerate the docs with
Qiskit#552 applied because I
suspect it will fix some issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants