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 a Single Python Code Documentation Style #141

Open
cannin opened this issue Apr 27, 2022 · 4 comments
Open

Use a Single Python Code Documentation Style #141

cannin opened this issue Apr 27, 2022 · 4 comments

Comments

@cannin
Copy link

cannin commented Apr 27, 2022

It looks like Google-style

https://github.com/Bioprotocols/paml/blob/802b65dc1628c53b149af47a525af8828ce516f5/paml/__init__.py#L258

and reStructuredText-style

https://github.com/Bioprotocols/paml/blob/802b65dc1628c53b149af47a525af8828ce516f5/paml/__init__.py#L72

are being used together in the code

@rpgoldman
Copy link
Collaborator

I have a pretty strong preference for Numpy style, which is readable when run through Sphinx but also readable in an editor or in python’s help. Google style is probably ok too. ReST style is ugly and cumbersome

@cannin
Copy link
Author

cannin commented May 6, 2022

@rpgoldman I have no strong preference other than consistency so that an API documentation generator will not have issues

@rpgoldman
Copy link
Collaborator

Here’s a good comparison of the three most prominent styles: https://queirozf.com/entries/python-docstrings-reference-examples

ReST/Sphinx style in my opinion is very hard to read on the screen until after it’s formatted by Sphinx, which means it’s not good with help() .

I prefer Numpy over Google, but that’s just because I’m used to it. Either would, IMO, be fine for PAML

@rpgoldman
Copy link
Collaborator

I have no direct experience with pydocstyle but perhaps it could be incorporated into our automated test framework, if we can choose a style.

I’ll experiment with it on some of my other projects.

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

No branches or pull requests

2 participants