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 span tag id=undefined and fix /api/qiskit/index entry #500

Merged
merged 6 commits into from
Dec 8, 2023

Conversation

arnaucasau
Copy link
Collaborator

@arnaucasau arnaucasau commented Dec 8, 2023

This PR fixes the issue with the undefined span IDs when generating the documentation and transforms the /api/qiskit/index entry in the toc file to /api/qiskit. A new test has been added to verify we don't generate span tags with an undefined id.

The Qiskit docs have been regenerated to verify the correct behavior of the script for the current version. The changes in the docs files are empty lines matching the great work done by @Eric-Arellano in #484 removing the tags manually.

Closes #485
Closes #227

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.

Thanks for looking into this all!

scripts/commands/updateApiDocs.ts Outdated Show resolved Hide resolved
scripts/lib/sphinx/sphinxHtmlToMarkdown.test.ts Outdated Show resolved Hide resolved
scripts/lib/sphinx/sphinxHtmlToMarkdown.ts Outdated Show resolved Hide resolved
@arnaucasau arnaucasau marked this pull request as ready for review December 8, 2023 16:25
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.

🚀

@arnaucasau arnaucasau added this pull request to the merge queue Dec 8, 2023
Merged via the queue into Qiskit:main with commit 8dd99d4 Dec 8, 2023
4 checks passed
@arnaucasau arnaucasau deleted the issue-485 branch December 8, 2023 16:46
github-merge-queue bot pushed a commit that referenced this pull request Dec 8, 2023
In #500, I changed the `/api/projectName/index` entry for every toc file
and made the make-historical conversation to be wrong. In the
`convertApiDocsToHistorical.ts` script, we modify the current toc file
to convert it into historical by changing all the links to point but the
release notes to the new subfolder.

We update the links with a regex that assumes we always have a file name
at the end, or in other words, a slash after the project name (e.g.
`/api/qiskit/`). This assumption is not true anymore because we changed
the entries `/api/projectName/index` to `/api/projectName`.

The new regex is the same but adds the possibility of ending without any
slash.
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
This PR fixes the issue with the undefined span IDs when generating the
documentation and transforms the `/api/qiskit/index` entry in the toc
file to `/api/qiskit`. A new test has been added to verify we don't
generate span tags with an undefined id.

The Qiskit docs have been regenerated to verify the correct behavior of
the script for the current version. The changes in the docs files are
empty lines matching the great work done by @Eric-Arellano in Qiskit#484
removing the tags manually.

Closes Qiskit#485
Closes Qiskit#227
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
In Qiskit#500, I changed the `/api/projectName/index` entry for every toc file
and made the make-historical conversation to be wrong. In the
`convertApiDocsToHistorical.ts` script, we modify the current toc file
to convert it into historical by changing all the links to point but the
release notes to the new subfolder.

We update the links with a regex that assumes we always have a file name
at the end, or in other words, a slash after the project name (e.g.
`/api/qiskit/`). This assumption is not true anymore because we changed
the entries `/api/projectName/index` to `/api/projectName`.

The new regex is the same but adds the possibility of ending without any
slash.
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.

Triage what is causing undefined spans in API docs Don't refer to /index in API table of contents for Qiskit
2 participants