Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing links to Source Code in Documentation pages #85073

Closed
simicode mannequin opened this issue Jun 7, 2020 · 4 comments
Closed

Missing links to Source Code in Documentation pages #85073

simicode mannequin opened this issue Jun 7, 2020 · 4 comments
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@simicode
Copy link
Mannequin

simicode mannequin commented Jun 7, 2020

BPO 40896
Nosy @ezio-melotti, @merwok, @willingc, @JulienPalard, @remilapeyre, @SimiCode
PRs
  • bpo-40896: add missing links to source-code to library documentation #20843
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2020-06-07.00:20:06.597>
    labels = ['3.7', '3.8', '3.9', '3.10', 'type-feature', 'docs']
    title = 'Missing links to Source Code in Documentation pages'
    updated_at = <Date 2020-06-12.21:20:39.631>
    user = 'https://github.com/simicode'

    bugs.python.org fields:

    activity = <Date 2020-06-12.21:20:39.631>
    actor = 'python-dev'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2020-06-07.00:20:06.597>
    creator = 'edison.abahurire'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40896
    keywords = ['patch']
    message_count = 3.0
    messages = ['370863', '370881', '370900']
    nosy_count = 8.0
    nosy_names = ['ezio.melotti', 'eric.araujo', 'docs@python', 'python-dev', 'willingc', 'mdk', 'remi.lapeyre', 'edison.abahurire']
    pr_nums = ['20843']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40896'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']

    @simicode
    Copy link
    Mannequin Author

    simicode mannequin commented Jun 7, 2020

    Just below the Module heading, most library documenation pages like https://docs.python.org/3/library/datetime.html have a link to the source code in the form of Source code: [Lib/datetime.py](https://github.com/python/cpython/blob/main/Lib/datetime.py) that links to the cpython github file of that module.

    Some modules like https://docs.python.org/3/library/time.html are missing this though and yet I think it would be quite useful for people who want to navigate the depths of the implementation.

    Now, the challenge is that most modules are not located in single code files but what if, instead of leaving it blank, we link to the folder that contains the code of that module? Wouldn't that be helpful?

    For example:
    For https://docs.python.org/3/library/wsgiref.html, we can add this https://github.com/python/cpython/tree/master/Lib/wsgiref as the link to source code.

    @simicode simicode mannequin assigned docspython Jun 7, 2020
    @simicode simicode mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jun 7, 2020
    @simicode simicode mannequin assigned docspython Jun 7, 2020
    @simicode simicode mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jun 7, 2020
    @remilapeyre
    Copy link
    Mannequin

    remilapeyre mannequin commented Jun 7, 2020

    In the case of time, it's a C module. Those usually don't have a link to their implementation at the top. Others like wsgiref should have a link as having a quick way to read the implementation is a nice way to check on the implementation details and get acquainted with Python's internal.

    Could you open a PR to add those?

    @remilapeyre remilapeyre mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes labels Jun 7, 2020
    @simicode
    Copy link
    Mannequin Author

    simicode mannequin commented Jun 7, 2020

    Thanks for the review.
    I'll open a PR.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @AA-Turner AA-Turner added 3.11 only security fixes 3.12 bugs and security fixes and removed 3.9 only security fixes 3.8 (EOL) end of life 3.7 (EOL) end of life labels Nov 12, 2022
    Mariatta pushed a commit that referenced this issue Nov 18, 2022
    Add some missing links to source from Python docs
    miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 18, 2022
    Add some missing links to source from Python docs
    (cherry picked from commit 27d8dc2)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    slateny added a commit to slateny/cpython that referenced this issue Nov 19, 2022
    Add some missing links to source from Python docs.
    (cherry picked from commit 27d8dc2)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    gvanrossum pushed a commit that referenced this issue Nov 19, 2022
    (cherry picked from commit 27d8dc2)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    kumaraditya303 pushed a commit that referenced this issue Nov 25, 2022
    gh-85073: Add some missing links to source (GH-99363)
    
    Add some missing links to source from Python docs
    (cherry picked from commit 27d8dc2)
    
    Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
    @hauntsaninja
    Copy link
    Contributor

    Nice, thanks for finishing this!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants