Style Guidelines and Enforcement#
General Coding Style#
Please stick to the coding style described by PEP8. PEP8 is one of the standard worldwide stylistic conventions for coding in Python.
Class and function docstrings should follow the numpydoc conventions.
Further, Landlab-specific advice for developing your own components can be found in the component development guide.
Many modern text editors, e.g., Atom, provide interactive tools to examine your code as you edit it and highlight where it diverges from standards.
All tools used for development are specified in our environment-dev.yml file. If you followed the developer installation instructions you have everything you need in the landlab_dev conda environment.
E203: whitespace before
E501: line too long (n > 88 characters)
W503: line break before binary operator
You can run
$ make pretty
To check if your files meet the standards that are enforced under continuous integration, we use flake8. You can run
from the top level directory or