Skip to content

Update docstrings for better rendering on website and numpydoc compliance #5459

Open
@OriolAbril

Description

@OriolAbril

Overview

We have to review and update all the docstrings of objects part of the public API (that is, that appear on the API reference section of the website). Why?

There are two main reasons:

  • Some functions are not documented correctly. i.e. pymc.Uniform didn't document that lower and upper bounds are optional and default to 0 and 1 respectively
  • Not following numpydoc results in non-ideal rendering. i.e. if there are no spaces around the colon that separates parameter name and type numpydoc+sphinx can't render it correctly and the type ends up being shown as bold text instead of being a link to the documentation of that object (which is particularly useful for functions taking or returning external objects such as ArviZ InferenceData or aesara TensorVariable).

Current view of the parameter section of pymc.Uniform

imatge

Before doing the changes described below

imatge

Details

A detailed tutorial on how to go about these updates is available at the PyMC-Data Umbrella sprint website (the page also has a video recorded by @reshamas showing an example PR).

How to choose what page to work on?

Look for pages that don't have hyperlinks in all their parameters. In case of doubt, don't hesitate to ask in this issue for pages to work on.

Metadata

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