classification
Title: Link to class and function source code on GitHub
Type: enhancement Stage:
Components: Documentation Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: boris, docs@python
Priority: normal Keywords:

Created on 2021-02-12 23:09 by boris, last changed 2021-02-12 23:09 by boris.

Pull Requests
URL Status Linked Edit
PR 24521 open boris, 2021-02-12 23:09
Messages (1)
msg386889 - (view) Author: Борис Верховский (boris) * Date: 2021-02-12 23:09
We can use shpinx.ext.linkcode to link classes and functions/methods to their source code on GitHub from the documentation. See linked PR for screen shots. This is far from linking all the symbols in the docs, but it's gets quite a few. It would be hard to get to 100% because of C modules that get re-exported in Python files.

It slighty increase the time it takes to generate the documentation with `make html`. I get 1m33s with these changes vs 1m28s without them.

One thing is that when you merge a PR on GitHub, any files it touches will have the wrong line numbers while the documentation is being re-built and deployed. That's mostly neglible since most files haven't been edited in the last couple of minutes, but if it's an issue it may be possible to set up the CI to build the documentation then deploy the docs and merge the PR at the same time.
History
Date User Action Args
2021-02-12 23:09:53boriscreate