Skip to content

[Docs] Move API documentation from api.rst to docstrings #364

Closed
@Priyansh121096

Description

Is your feature request related to a problem? Please describe.
Right now, any API changes or changes in behavior worth documenting need to be documented separately in doc/api.rst. We need to make sure manually api.rst is constantly in sync with the code.

Describe the solution you'd like
We should move the documentation to function docstrings and use sphinx-autodoc + sphinx-autodoc-typehints to generate api.rst. This will automatically generate API documentation with signatures + typehints + function/param docstrings from the current code and this way we can make sure that the documentation is always in sync. And while it is true that docstrings can go out of sync with the code too, it is much easier to not forget updating those than api.rst IMO.

Describe alternatives you've considered

Additional context
I'm willing to submit a PR for this (and it'd be great if I could use the same as one of my hacktoberfest contributions 😄 ).

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions