In general, stick to the PEP standards as good as possible.
When adding new functions/modules, use the existing directory structure or include/describe the newly added folders or files in the README.md.
Keep consistent with existing file, function, and class docstrings. Use and update comments, so that others can quickly see what your code is about.
Thank you for contributing! :)
Top-level comment:
code
# ----------------------------------------------------------------------------------------------------------------------
# Comment
# ----------------------------------------------------------------------------------------------------------------------
code
or
code
# ----------------------------------------------------------------------------------------------------------------------
# Comment
# Description of following section
# ----------------------------------------------------------------------------------------------------------------------
code
Mid-level comment:
code
#
# Comment
#
code
or
code
#
# Comment
# Description of following section
#
code
Low-level comment:
code
# Comment
code
If working with PyCharm, please use the provided configuration file. Import via
File->Settings->Editor->Code Style->Manage->Import...
File->Settings->Editor->File and Code Templates->Python
Numpy style is interpretable by sphinx and recommended:
# -*- coding: utf-8 -*-
"""
Short discription of contents and purpose of file
"""