Qiskit / qiskit-ibm-provider

Qiskit Provider for accessing the IBM Quantum Services: Online Systems and Simulators
https://qiskit.org/ecosystem/ibm-provider/
Apache License 2.0
77 stars 67 forks source link

Use sphinx.ext.linkcode for more precise source code links #821

Closed melechlapson closed 8 months ago

melechlapson commented 8 months ago

Summary

This addresses https://github.com/Qiskit/documentation/issues/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 https://github.com/Qiskit/qiskit_sphinx_theme/pull/589 and in the qiskit repo in https://github.com/Qiskit/qiskit/pull/11851 as well as the runtime repo in https://github.com/Qiskit/qiskit-ibm-runtime/pull/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:

coveralls commented 8 months ago

Pull Request Test Coverage Report for Build 8073974612

Details


Totals Coverage Status
Change from base Build 8072871912: 0.0%
Covered Lines: 2940
Relevant Lines: 6782

💛 - Coveralls