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

Use napolean extension in docs to handle numpy docstrings too #3871

Merged
merged 6 commits into from
Sep 22, 2020

Conversation

tkknight
Copy link
Contributor

@tkknight tkknight commented Sep 21, 2020

🚀 Pull Request

Description

This PR enables adoption (but does not force) of numpy docstrings. This solves #3841

Enabling napolean sphinx extension to allow for google style docstrings and now also numpy style docstrings.

Just by enabling this extension causes build warnings due to existing incorrectly formatted docstrings. A couple of files needed to be updated to allow for a clean build.

The requirements/ci/py37.yml and py36.yml have been updated to include the new dependency for this extension.

Note that the documentation now will also include all dunders, you can search for dunders via:

The setting named napoleon_include_special_with_doc can change this (currently set to True) in conf.py.

Note that the links to the This PR is only valid for the lifetime of this PR.


Consult Iris pull request check list

@tkknight tkknight linked an issue Sep 21, 2020 that may be closed by this pull request
@bjlittle bjlittle self-assigned this Sep 21, 2020
@tkknight tkknight marked this pull request as ready for review September 21, 2020 14:38
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

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

@tkknight Awesome, we can finally beat the doc-strings into shape now. Also it opens the door to escalating sphinx warnings to exceptions 👍

Just a minor change required, then this is good to go 🚀

requirements/ci/py36.yml Show resolved Hide resolved
@bjlittle
Copy link
Member

closes #3841

@bjlittle bjlittle merged commit 10b3f9a into SciTools:master Sep 22, 2020
tkknight added a commit to tkknight/iris that referenced this pull request Sep 22, 2020
* master:
  Use napolean extension in docs to handle numpy docstrings too (SciTools#3871)
  Added whats new for pr3873 (SciTools#3874)
@tkknight tkknight mentioned this pull request Sep 22, 2020
tkknight added a commit to tkknight/iris that referenced this pull request Sep 22, 2020
* master:
  Use napolean extension in docs to handle numpy docstrings too (SciTools#3871)
  Added whats new for pr3873 (SciTools#3874)
  linkcheck ignore for iris pull and issue url (SciTools#3873)
  Remove all local table of contents (SciTools#3872)
  Added whats new entry for pr3852 (SciTools#3854)
@tkknight tkknight deleted the napolean2 branch September 22, 2020 15:15
@tkknight tkknight mentioned this pull request Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs build error (google vs numpy docstrings)
2 participants