-
Notifications
You must be signed in to change notification settings - Fork 1
Coding conventions #3
Comments
What about for JavaScript the airbnb Style Guide? They also have a React/JSX Style Guide |
For the python docstrings, I recommend Google Style Python Docstrings , which becomes handy in combination with Sphinx-Napoleon to auto-generate parts of a doc. |
@Leats Research on doc string till sunday. |
I researched both the PEP 257 Docstring conventions and the Google Style Python Docstrings, which @gitmirgut suggested. PEP 257 - Docstring Conventions:Nicely structured, gives more in-depth information about how to write the docstrings (e.g. write „Do this.“ instead of „Does this.“, ….) Google Style Python Docstrings:Has more information about the overall structure of the docstrings, e.g. how one should write about the Args, Returns, Raises. While PEP mentions those it does not give conventions about the structure of them. Also, as gitmirgut mentioned, if we use Sphinx with Napoleon it seems like we can let some parts of the documentation get auto-generated. The tutorial on this does seem to be straightforward enough. However, I have never worked with Sphinx before/ I’m not sure if we already talked about other tools helpful for documentation/ if anyone has other ideas about that? From what I’ve read I would also tend to use Google’s Docstring Conventions, maybe with the addition on how to write the description („Do this.“ instead of „Does this.“ or the other way around, to keep it in one style, unless you think that’s overkill) |
Google Style > PEP |
Agree on coding conventions.
Tabs: 4 Spaces
Format: UTF-8
Line breaks: Unix Style
Recommendations:
The text was updated successfully, but these errors were encountered: