Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Make Sphinx understand Google docstring style #241

Closed
dhermes opened this issue Aug 7, 2015 · 9 comments
Closed

Make Sphinx understand Google docstring style #241

dhermes opened this issue Aug 7, 2015 · 9 comments

Comments

@dhermes
Copy link
Contributor

dhermes commented Aug 7, 2015

Currently, certain things don't get build as expected:
screen_shot_008

The other option is just to convert the docstrings to Sphinx/ReST style (maybe could go nicely with #137).

@nathanielmanistaatgoogle
Copy link
Contributor

The right thing to do here is for our code to conform to whatever the Python-language-wide accepted standard is rather than teach the standard tools to understand our code. :-)

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

I don't know if Sphinx is "Python-language-wide accepted", but python.org is built with it, so that's good.

Also, Google style docstrings are pretty well known, so there may be a Sphinx plug-in. I should've made it clear that no code should be written / kittens harmed in the resolving of this issue.

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

And here's your sign: https://pypi.python.org/pypi/sphinxcontrib-napoleon

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

Even better it's already in docs/conf.py: https://github.com/google/oauth2client/blob/62b7f26d5852100221f59a88d6bcf2da6e218fc9/docs/conf.py#L21

Somehow it's missing that image I posted though.

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

Culprit, Exceptions is not one of the accepted section headers. Should be Raises.

From the napolean docs:

screen_shot_009

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

@nathanielmanistaatgoogle It seems the webhook to auto-build isn't set up.

When I view webhooks for a project I am an admin for, I see:

screen_shot_010

Can you check out

https://github.com/google/oauth2client/settings/hooks

and see if the hook is set up? If not, we'll need to figure out a way to do it (may involve you creating an account on readthedocs.org).

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

FWIW I manually forced a rebuild and the rendering issue is resolved:

screen_shot_011

@nathanielmanistaatgoogle
Copy link
Contributor

Your suspicion is correct; ReadTheDocs does not appear under "Services" at this time.

@dhermes
Copy link
Contributor Author

dhermes commented Aug 7, 2015

(For posterity:) Added easily via: https://read-the-docs.readthedocs.org/en/latest/webhooks.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants