[issue28929] Provide a link from documentation back to its source file
New submission from Brett Cannon: It would be great if we provided a link from a documentation page back to the source file that the page is produced from, e.g. have https://docs.python.org/3.6/library/abc.html provide a link to https://github.com/python/cpython/blob/3.6/Doc/library/abc.rst. ---------- assignee: docs@python components: Documentation messages: 282818 nosy: brett.cannon, docs@python priority: normal severity: normal stage: needs patch status: open title: Provide a link from documentation back to its source file type: enhancement _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: On the left menu, there's already a Show Source link. Is the idea to replace that link to github.com/python/cpython/blob/.... ? Or, are you thinking about adding a new link under the main heading, similar to **Source code:** :source:`Lib/abc.py` but for the docs, so maybe by creating a new role like: **Docs Source code:** :docs_source:`Doc/library/abc.rst` ---------- nosy: +Mariatta _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Brett Cannon added the comment: Either idea works, but I want a link that someone who finds a spelling mistake can easily follow and submit a PR to fix the issue. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: Thanks, Brett :) I think it's easier to update the existing Source Link to github. I'll work on a patch for this. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: Hi, This patch updates the Show Source link on the left of Docs menu and point it to github. I tested it locally, and works for versions >= 3.5 Please let me know if you have any feedback about this. Thanks :) Not sure if the older docs versions should be updated too? In that case, I'll need to prepare different patches for 3.4, 3.3 and 2.7 ---------- keywords: +patch Added file: http://bugs.python.org/file45846/issue28929dev.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Brett Cannon added the comment: Thanks for the patch, Mariatta! Once we have migrated to GitHub we can apply the patch (don't let me forget :) ). Any version still under active maintenance should probably be updated, so that would probably mean 2.7 but not the other versions. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: Thanks, Brett. Here's the patch that will work for the 2.7 branch. ---------- Added file: http://bugs.python.org/file45854/issue28929-v27.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Terry J. Reedy added the comment: Nice idea. I agree with an updated sidebar link, both aesthetically and as a practical matter for doc maintainers. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Brett Cannon added the comment: Now that we have migrated to GitHub and Mariatta is a core dev I'm assigning this to her. :) ---------- assignee: docs@python -> Mariatta _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +35 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +36 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +37 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +38 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: Thanks all :) PRs have been merged on GitHub. Closing this. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +75 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +254 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +255 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +256 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Larry Hastings <larry@hastings.org>: ---------- pull_requests: +600 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset 23d2c31cbf3032b8c6bb254f06c4532a6db466b6 by Mariatta in branch '2.7': [2.7] bpo-28929: Add to Misc/NEWS (GH-286) https://github.com/python/cpython/commit/23d2c31cbf3032b8c6bb254f06c4532a6db... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset 5023686f7ee69e9da07cda4b7da6691f19892111 by Mariatta in branch '3.5': [3.5] bpo-28929: Add to Misc/NEWS (GH-285) https://github.com/python/cpython/commit/5023686f7ee69e9da07cda4b7da6691f198... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset 1a8dd944d4016593e78a7a6c3c635adee783abfd by Mariatta in branch '3.6': [3.6] bpo-28929: Add to Misc/NEWS (GH-284) https://github.com/python/cpython/commit/1a8dd944d4016593e78a7a6c3c635adee78... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset e3bf4cdd3db9004220d3ec7f5db4e7d16a99c743 by Mariatta in branch 'master': bpo-28929: Add to Misc/NEWS (GH-112) https://github.com/python/cpython/commit/e3bf4cdd3db9004220d3ec7f5db4e7d16a9... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset f66c81ff499fb431e56bc68f5e39c2f7b9fcb6a7 by Mariatta in branch '3.6': [backport to 3.6] bpo-28929: Link the documentation to its source file on GitHub (#37) https://github.com/python/cpython/commit/f66c81ff499fb431e56bc68f5e39c2f7b9f... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset d4a97d894859d4bb52937d46460049ba016e00b2 by Mariatta in branch 'master': bpo-28929: Link the documentation to its source file on GitHub (#35) https://github.com/python/cpython/commit/d4a97d894859d4bb52937d46460049ba016... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset e15259c2dfef58df5f7cfa2305811a00c05e0353 by Mariatta in branch '2.7': bpo-28929: Link the documentation to its source file on GitHub (#38) https://github.com/python/cpython/commit/e15259c2dfef58df5f7cfa2305811a00c05... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Mariatta Wijaya added the comment: New changeset cabd1c7462ef991937e0e759b9bf307b3091ef06 by Mariatta in branch '3.5': [backport to 3.5] bpo-28929: Link the documentation to its source file on GitHub (#36) https://github.com/python/cpython/commit/cabd1c7462ef991937e0e759b9bf307b309... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
Changes by Donald Stufft <donald@stufft.io>: ---------- pull_requests: +1023 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue28929> _______________________________________
participants (5)
-
Brett Cannon -
Donald Stufft -
Larry Hastings -
Mariatta Wijaya -
Terry J. Reedy