-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve header hierarchy for utils documentation #11923
Merged
jakelishman
merged 7 commits into
Qiskit:main
from
Eric-Arellano:EA/improve-utils-headers
Mar 1, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0df0d06
Improve header hierarchy for utils documentation
Eric-Arellano 023069d
Fix pylint
Eric-Arellano a637306
Merge branch 'main' of github.com:Qiskit/qiskit-terra into EA/improve…
Eric-Arellano 608d33c
Review feedback
Eric-Arellano 7df1d87
Merge branch 'main' of github.com:Qiskit/qiskit-terra into EA/improve…
Eric-Arellano e530b31
Use mod cross-reference to self
Eric-Arellano 3bcdc24
Merge branch 'main' into EA/improve-utils-headers
Eric-Arellano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code snippet makes this header unnecessarily long in the page table of contents. The table will already show the full import path, and I also tweaked the opening paragraph below to say the module name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A potential alternative is to give
qiskit.utils.optionals
its own rst file and entry in the toc, so it appears as a separate page? Our other module headers (that are standalone pages) all include this:mod:`qiskit.module`
but in the title, so it's good for consistency.That said, I don't feel strongly, and if this does stay in line, I'm fine to remove the bit from the title. It was originally included for consistency, and because I think the theme at the time didn't document things with fully qualified names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For it to be its own page in IQP, it will either need to be at the same level as
utils
, i.e. top-level likeqiskit.utils.optionals
in the left side bar; orqiskit.utils
becomes like a folder that you have to click to expand and it has anOverview
page and second page for optionals. Neither of those are very appealing. So let's stick with inline.I'll make your tweaks though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm fine either inline or separate page. I think I originally made this documentation, and I went inline in the original form too.