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

coding style #21

Closed
wyli opened this issue Jan 13, 2020 · 2 comments
Closed

coding style #21

wyli opened this issue Jan 13, 2020 · 2 comments
Assignees

Comments

@wyli
Copy link
Contributor

wyli commented Jan 13, 2020

(This ticket is originally from the monai-minimal repo)

Would be great to have a good coding style from day one...
e.g.,
Function and variable names should be lowercase, with words separated by underscores as necessary to improve readability.
Class names should normally use the CapWords convention.

To close this ticket, we ensure that on the project running flake8 (with pep8-naming plugin) with config https://github.com/Project-MONAI/MONAI/blob/a106c79b706a72933520aaba4fc43eb85765985e/.flake8
returns no error message.

@ericspod
Copy link
Member

The flake8 definition is what we should go with, providing a shell script to automatically run black to format the code wouldn't be a bad idea. We should also nail down what format comments should be in, I would suggest Numpy format https://numpydoc.readthedocs.io/en/latest/format.html as a good hybrid of Google docstrings and reStructured Text formats, however Pytorch uses Google docstrings so maybe we should stick to that.

@wyli wyli closed this as completed in eb9189d Jan 13, 2020
@wyli
Copy link
Contributor Author

wyli commented Jan 13, 2020

the docstrings format issue will be addressed in #12

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