View on GitHub

SSC Coding Guidelines

Python Coding Guidelines

Our recommendations for creating and maintaining reliable scientific software in Python.

Good default choices

Here are our suggested default choices for build systems and third party libraries, which are all widely used and well supported:

For each choice there are of course many alternatives, each with their pros and cons, but these represent a sensible default choice for the vast majority of Python projects.

Our Python Project Template is a simple way to start a new Python project with all of the above already set up - just click on the green Use this template button.

For more advanced features such as automated pypi deployment and package versioning integrated with git see our Python Package Cookiecutter

Tooling

Good tools make it easier to develop good code. Unlike the previous section, where a single choice must be made for the project, each person contributing to a project can use whichever tools they prefer. Some recommendations:

There is a vast abundance of available modules in Python. For common problems in scientific computing, use