This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Use sphinx.ext.linkcode for more precise source code links #821
Merged
kt474
merged 6 commits into
Qiskit:main
from
melechlapson:mlapson/switch-to-sphinx-ext-linkcode
Feb 28, 2024
Merged
Use sphinx.ext.linkcode for more precise source code links #821
kt474
merged 6 commits into
Qiskit:main
from
melechlapson:mlapson/switch-to-sphinx-ext-linkcode
Feb 28, 2024
Conversation
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
melechlapson
changed the title
switched from using sphinx-ext-viewcode to sphinx-ext-linkcode
Use sphinx.ext.linkcode for more precise source code links in provider repo
Feb 27, 2024
melechlapson
changed the title
Use sphinx.ext.linkcode for more precise source code links in provider repo
Use sphinx.ext.linkcode for more precise source code links in the provider repo
Feb 27, 2024
Pull Request Test Coverage Report for Build 8073974612Details
💛 - Coveralls |
Eric-Arellano
changed the title
Use sphinx.ext.linkcode for more precise source code links in the provider repo
Use sphinx.ext.linkcode for more precise source code links
Feb 27, 2024
Eric-Arellano
approved these changes
Feb 28, 2024
kt474
approved these changes
Feb 28, 2024
Eric-Arellano
added a commit
to Eric-Arellano/qiskit-ibm-provider
that referenced
this pull request
Feb 28, 2024
* switched from using sphinx-ext-viewcode to sphinx-ext-linkcode * updated tox.ini * removed leftover code from azure * switched dashes to underscores * Try fix for methods inherited by Qiskit --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
kt474
pushed a commit
that referenced
this pull request
Feb 28, 2024
* switched from using sphinx-ext-viewcode to sphinx-ext-linkcode * updated tox.ini * removed leftover code from azure * switched dashes to underscores * Try fix for methods inherited by Qiskit --------- Co-authored-by: melechlapson <melechlapson@yahoo.com>
Eric-Arellano
added a commit
that referenced
this pull request
Feb 28, 2024
Fixes #821. I made a divergence from our testing in qiskit-sphinx-theme to make the INI file more readable, and I didn't properly test it. My bad! This bug meant that we always used `main` as the branch name. I tested this out locally and it works now: ``` GITHUB_REF_NAME="pull" GITHUB_BASE_REF="upstream" tox -e docs ... raise ValueError(GITHUB_BRANCH) ValueError: upstream ```
Eric-Arellano
added a commit
to Eric-Arellano/qiskit-ibm-provider
that referenced
this pull request
Feb 28, 2024
Fixes Qiskit#821. I made a divergence from our testing in qiskit-sphinx-theme to make the INI file more readable, and I didn't properly test it. My bad! This bug meant that we always used `main` as the branch name. I tested this out locally and it works now: ``` GITHUB_REF_NAME="pull" GITHUB_BASE_REF="upstream" tox -e docs ... raise ValueError(GITHUB_BRANCH) ValueError: upstream ```
kt474
pushed a commit
that referenced
this pull request
Feb 28, 2024
Fixes #821. I made a divergence from our testing in qiskit-sphinx-theme to make the INI file more readable, and I didn't properly test it. My bad! This bug meant that we always used `main` as the branch name. I tested this out locally and it works now: ``` GITHUB_REF_NAME="pull" GITHUB_BASE_REF="upstream" tox -e docs ... raise ValueError(GITHUB_BRANCH) ValueError: upstream ```
Eric-Arellano
pushed a commit
that referenced
this pull request
Apr 18, 2024
### Summary A follow-up from Qiskit/qiskit-ibm-runtime#1439. In recent PRs including my PR #821, the CI has been throwing several errors due to old versions of actions that are using node12 or node16 instead of node20. I updated the actions to use the latest versions which should eliminate the CI warnings.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
This addresses Qiskit/documentation#517 by switching out the sphinx.ext.viewcode for the sphinx.ext.linkcode extension which allows our GitHub links in the documentation to be linked to the specific lines of code, not just the file. This was tested successfully in Qiskit/qiskit_sphinx_theme#589 and in the qiskit repo in Qiskit/qiskit#11851 as well as the runtime repo in Qiskit/qiskit-ibm-runtime#1431 and now we want to implement it in the provider repo.
The API generation script at Qiskit/documentation already knows how to handle sphinx.ext.linkcode.
Example links from this PR: