Skip to content

Code Style

John Holt edited this page Mar 16, 2018 · 1 revision

Wiki > Code Style

Good code style although not essential will make it easier to share the code.

IDE

We recommend coding in PyCharm community edition and turning on PEP8 warning and missing doc string warnings. This will make it easier to keep the code clean (look for a tick on the file in the top right hand corner to know it is clean).

Documentation

We recommend using docstrings for all code and including example code for external interfaces. For example

def my_function(use_greatnes=True):
    """
    Does something great.

    Args:
        use_greatness (bool, optional): switch to switch on greatness.

    Examples:
        Switch greatness off:

        >>> my_function(False)
    """
    ...
Clone this wiki locally