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

Automatically tabulate module contents in the docs #83545

Open
alexchandel mannequin opened this issue Jan 16, 2020 · 3 comments
Open

Automatically tabulate module contents in the docs #83545

alexchandel mannequin opened this issue Jan 16, 2020 · 3 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@alexchandel
Copy link
Mannequin

alexchandel mannequin commented Jan 16, 2020

BPO 39364
Nosy @JulienPalard, @alexchandel

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-01-16.22:05:46.796>
labels = ['3.8', 'type-feature', '3.7', '3.9', 'docs']
title = 'Automatically tabulate module contents in the docs'
updated_at = <Date 2020-01-17.08:13:58.250>
user = 'https://github.com/alexchandel'

bugs.python.org fields:

activity = <Date 2020-01-17.08:13:58.250>
actor = 'xtreak'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2020-01-16.22:05:46.796>
creator = 'alexchandel'
dependencies = []
files = []
hgrepos = []
issue_num = 39364
keywords = []
message_count = 1.0
messages = ['360148']
nosy_count = 3.0
nosy_names = ['docs@python', 'mdk', 'alexchandel']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue39364'
versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9']

@alexchandel
Copy link
Mannequin Author

alexchandel mannequin commented Jan 16, 2020

By default, the docs.python.org page for a module does not list or tabulate the contents of that module. This makes it difficult to browse a module's functions or get a bird's-eye view.

For example, the logging module (https://docs.python.org/3/library/logging.html) has almost 70 functions, methods, and attributes. But it's impossible to scan them without scrolling the entire length of the entry (~18 pages of US letter). Compare to the browsability of itertools (https://docs.python.org/3/library/itertools.html), which manually tabulates its functions in the first section.

docs.python.org should automatically generate a TOC of the module's contents (classes, functions, etc) in the navigation sidebar, below the existing sidebar sections (perhaps in a collapsible section). Rust's documentation does this (example: https://doc.rust-lang.org/std/time/struct.Duration.html), and doc.rust-lang.org also effectively allows the entire page to function as a TOC by providing a "collapse page" button.

@alexchandel alexchandel mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Jan 16, 2020
@alexchandel alexchandel mannequin assigned docspython Jan 16, 2020
@alexchandel alexchandel mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Jan 16, 2020
@alexchandel alexchandel mannequin assigned docspython Jan 16, 2020
@alexchandel alexchandel mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jan 16, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@pradyunsg
Copy link
Member

This is closely related to an open Sphinx issue: sphinx-doc/sphinx#6316

There's some experimentation being done, toward making this possible for Sphinx projects via Sphinx's extension mechanisms: https://gist.github.com/agoose77/e8f0f8f7d7133e73483ca5c2dd7b907f#gistcomment-4283770

@AA-Turner
Copy link
Member

Sphinx 5.2.0 has been released incorporating this feature.

A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only 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