Skip to content

Fix rendering of Google-style docstrings #2061

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

Merged
merged 6 commits into from
Jul 12, 2022

Conversation

adamjstewart
Copy link
Contributor

@adamjstewart adamjstewart commented Jul 11, 2022

Many docstrings use Google-style conventions and require the sphinx.ext.napoleon extension to render correctly.

For example, gpytorch.kernels.PeriodicKernel uses Python-style :param: lists and renders correctly, but gpytorch.kernels.ScaleKernel uses Google-style Args: lists and is not rendered correctly. This PR fixes that: before, after.

Fixing this uncovered a lot of other issues in the docs. :attr: should only be used to cross-reference class attributes, not to define or cross-reference function parameters.

Copy link
Collaborator

@Balandat Balandat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for this!

Copy link
Member

@gpleiss gpleiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @adamjstewart ! This is super helpful!

@gpleiss gpleiss merged commit db72551 into cornellius-gp:master Jul 12, 2022
@adamjstewart adamjstewart deleted the docs/napoleon branch July 12, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants