Contribute to snowprofile

Developer environment

Any contributor must:

  • use the git versioning tool

  • work in a branch, deriving from either the latest master or dev branches.

  • Test before commit (see below)

  • Ensure new development have a corresponding test

  • Ensure new development have a corresponding documentation

  • Ensure you followed guidelines below

Code style

Python code should comply with PEP8 https://www.python.org/dev/peps/pep-0008 style guide. Please check your code before committing. In particular, tabs are prohibited and lines may not exceed 120 characters.

Shebangs

Moreover, all codes must specify the encoding, which have to be utf-8:

# -*- coding: utf-8 -*-

Imports and dependecies

Please avoid relative imports in snowprofile.

See PEP 8 import section https://www.python.org/dev/peps/pep-0008/#imports for more details on correct import order and other guidelines on imports.

Of course star-imports (from XXX import *) are prohibited.

Dependencies should be limited to those absolutely necessary. Please use the python standard library as much as possible and discuss with maintainers before introducing a new dependency.

Language

Of course, all comments in the code, documentation, commit message or variable names have to be in english.

Tests

To ensure backward compatibility and maintainability of the code, the snowprofile package comes with a test suite.

To run the tests, just go the the snowprofile code repository and run python3 -m pytest.

When developping, please run the test base before each commit and ensure that new developments come with new tests.