Skip to content

Latest commit

 

History

History
91 lines (59 loc) · 1.88 KB

CONTRIBUTING.md

File metadata and controls

91 lines (59 loc) · 1.88 KB

Coding Conventions (Python)

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! :)

Comments for File Structure

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

PyCharm Configuration

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

Docstring conventions

Numpy style is interpretable by sphinx and recommended:

File Template

# -*- coding: utf-8 -*-
"""
Short discription of contents and purpose of file

"""