-
Notifications
You must be signed in to change notification settings - Fork 21
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
Refactor docstrings to Google standard format #16
Comments
This seems reasonable. I've usually used the Google standard which is a bit more compact but I think the numpy one might be a little easier to write. One thing I would like is that instead of a big comment block at the top of the file we should use module-level docstrings, as these are actually accessible to code, etc, rather than only readable by humans. |
I'm happy to use the Google standard too. @littell @joanise any preferences? Google: def func(arg1, arg2):
"""Summary line.
Extended description of function.
Args:
arg1 (int): Description of arg1
arg2 (str): Description of arg2
Returns:
bool: Description of return value
"""
return True Numpy def func(arg1, arg2):
"""Summary line.
Extended description of function.
Parameters
----------
arg1 : int
Description of arg1
arg2 : str
Description of arg2
Returns
-------
bool
Description of return value
"""
return True |
My top concern would be consistency throughout. Either is fine, although Google requires less typing and is a bit easier to read when looked at in the plain text source. So my vote is a slight preference for Google style. |
I'm happy with Google then too. I changed the title of this issue. |
I just added missing documentation for the |
Following decision made in ReadAlongs#16, convert the existing Numpy standard doc in audio_utils.py to Google standard.
Following decision made in #16, convert the existing Numpy standard doc in audio_utils.py to Google standard.
Following decision made in #16, convert the existing Numpy standard doc in audio_utils.py to Google standard.
Following decision made in #16, convert the existing Numpy standard doc in audio_utils.py to Google standard.
Useful link to the Google python doc standard, embedded in their Python style guide: https://google.github.io/styleguide/pyguide.html See section 3.8 Comments and Docstrings. |
Much progress has been done is this docstring conversion, but I guess it's not fully complete yet. I do it as a "drive-by" task, when I touch files for other reasons, it's less painful this way. |
But now it's time to close this issue. There's more drive-by fixing to do, but the bulk is done. |
This was brought up in PR https://github.com/dhdaines/ReadAlong-Studio/pull/8 - I think we should adopt some kind of standard for docstrings, for the sake of documentation and integration with Sphinx as well as just general consistency. The numpy standard was proposed.
The text was updated successfully, but these errors were encountered: