Skip to content

Autogeneration of .rst pages using Sphinx's autosummary/autogen #5309

Description

@harshil21

Currently, for every new class we want to add to the docs, we need to have a .rst file. While implementing new API updates, this process can get tedious, error-prone, and requires extra effort while reviewing to make sure everything was added alphabetically.

Proposal

Autogeneration! Sphinx already supports this workflow using their autosummary module. We can have a template which specifies what the stub .rst file should look like.

Our __all__'s will give us the list for public classes to generate docs for. The implementation will also allow for manual page entries, so more complex entries can still be written if needed.

telegram.at-tree will have our custom new sphinx directive, so we can actually delete everything inside it. During the sphinx build, it will be populated with the correct .rst links like we have currently. This would be done in memory, so the file itself would remain unchanged.

Metadata

Metadata

Assignees

Labels

Fields

Priority

Medium

Effort

Medium

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions