Skip to content
This repository was archived by the owner on Aug 19, 2023. It is now read-only.

Fix Sphinx docs issues with extlinks#1743

Merged
1ucian0 merged 12 commits into
Qiskit:masterfrom
Eric-Arellano:fix-exceptions-import
Jun 5, 2023
Merged

Fix Sphinx docs issues with extlinks#1743
1ucian0 merged 12 commits into
Qiskit:masterfrom
Eric-Arellano:fix-exceptions-import

Conversation

@Eric-Arellano
Copy link
Copy Markdown
Collaborator

@Eric-Arellano Eric-Arellano commented May 22, 2023

We've been getting this error in our docs, which blocks us from enabling -W (error on warnings):

WARNING: extlinks: Sphinx-6.0 will require a caption string to contain exactly one '%s' and all other '%' need to be escaped as '%%'.

@Eric-Arellano Eric-Arellano marked this pull request as ready for review May 24, 2023 17:48
@Eric-Arellano Eric-Arellano changed the title WIP: debug import failure for dagcircuits.exceptions Fix more Sphinx docs issues May 24, 2023
Comment thread docs/conf.py
# -- Configuration for extlinks extension ------------------------------------
# Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
extlinks = {
"pull_terra": ("https://github.com/Qiskit/qiskit-terra/pull/%s", "#"),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unused

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found many release notes refer to terra issues but the links are normal links. See https://qiskit.org/documentation/release_notes.html#bug-fixes

Screenshot 2023-05-31 at 15 59 02

For example #9798 <https://github.com/Qiskit/qiskit-terra/issues/9798> in:

https://github.com/Qiskit/qiskit-terra/blob/main/releasenotes/notes/0.24/fix-9798-30c0eb0e5181b691.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we keep others, I think we should keep pull_terra and advertise the usage of this plugin. If not, perhaps we can change where pull_aer and pull_ibmq-provider are used to normal links and get rid of the extlinks altogether.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure, added back.

Comment thread docs/conf.py
Comment on lines +137 to +141
"pull_aer": ("https://github.com/Qiskit/qiskit-aer/pull/%s", "qiskit-aer #%s"),
"pull_ibmq-provider": (
"https://github.com/Qiskit/qiskit-ibmq-provider/pull/%s",
"qiskit-ibmq-provider #%s",
),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These are used in release_notes.py, like this:

 Refactor thread management :pull_aer:`50`

This changes the text that we will render. Before, #50. Now, qiskit-aer #50.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't know this extension exist. It's quite handy. We should use it more.

Comment thread docs/conf.py Outdated
Comment thread docs/maintainers_guide.rst Outdated
@Eric-Arellano Eric-Arellano changed the title Fix more Sphinx docs issues Fix Sphinx docs issues with extlinks May 30, 2023
@Eric-Arellano
Copy link
Copy Markdown
Collaborator Author

I removed the controversial parts of this PR because I'm going to open a dedicated PR for it. It's bigger surgery. This PR is ready to go and has no controversy.

@Eric-Arellano Eric-Arellano requested a review from 1ucian0 June 2, 2023 14:12
@1ucian0 1ucian0 merged commit 041ea7b into Qiskit:master Jun 5, 2023
@Eric-Arellano Eric-Arellano deleted the fix-exceptions-import branch June 5, 2023 10:40
jakelishman pushed a commit to jakelishman/qiskit-terra that referenced this pull request Aug 11, 2023
* WIP: debug import failure for dagcircuits.exceptions

* Revert "WIP: debug import failure for dagcircuits.exceptions"

This reverts commit a40a25b6fd23fe24f7ece6fa11e94cca8e7ceaf4.

* Try double backticks

* Fix issue with extlink

* Fix loading of versionutils

* Revert maintainers guide change for now

* Add Terra back

---------

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants