Repository navigation
Docs source links on GitHub - #8743
Draft
Jens Hedegaard Nielsen (jenshnielsen) wants to merge 5 commits into
Draft
Jens Hedegaard Nielsen (jenshnielsen) wants to merge 5 commits into
Jens Hedegaard Nielsen (jenshnielsen) wants to merge 5 commits into
Conversation
Jens Hedegaard Nielsen (jenshnielsen)
requested a review
from a team
as a code owner
November 9, 2026 07:41
Jens Hedegaard Nielsen (jenshnielsen)
marked this pull request as draft
November 9, 2026 07:41
Codecov Report❌ Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
docs-source-links-on-github
branch
3 times, most recently
from
November 9, 2026 19:21
709a37f to
e0017e8
Compare
sphinx.ext.viewcode renders a highlighted source page for each of the ~230 documented modules. Each of these pages includes the full furo navigation tree, which is expensive to compute, so they added about a minute to a serial (Windows) docs build. Use sphinx.ext.linkcode to link to the source on GitHub instead. The link points to the tag of a release, or to the commit embedded in the version of a development build, so that it matches the documented code. Line numbers are found with the same parser that viewcode uses. Unlike viewcode, inherited members now link to the base class definition.
Move the linkcode_resolve logic out of docs/conf.py into qcodes.sphinx_extensions.github_source_links so that it is type checked and can be tested, and add tests for it. conf.py now only creates the function with make_linkcode_resolve. Also drop the handling of decorated functions and cached properties. functools.wraps already copies the module and qualified name used for the lookup, and cached properties are only used for private attributes, which are not documented.
Fixes the blind-except lint error and formats the new tests.
Jens Hedegaard Nielsen (jenshnielsen)
force-pushed
the
docs-source-links-on-github
branch
from
November 9, 2026 19:29
e0017e8 to
1f2e635
Compare
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reduce size and speed up docs builds by linking to code on github rather than embedding it