Coding Standards

In order to maintain consistency across the different instruments in the PyMeasure repository, we enforce the following standards.

Python style guides

Only Python 3 is used in PyMeasure. This prevents the maintaininace overhead of supporting Python 2.7, which will lose official support in the future.

The PEP8 style guide and PEP257 docstring conventions should be followed.

Function and variable names should be lower case with underscores as needed to seperate words. CamelCase should only be used for class names, unless working with Qt, where its use is common.


PyMeasure documents code using reStructuredText and the Sphinx documentation generator. All functions, classes, and methods should be documented in the code using a docstring.

Usage of getter and setter functions

Getter and setter functions are discouraged, since properties provide a more fluid experience. Given the extensive tools avalible for defining properties, detailed in the Advanced properties section, these types of properties are prefered.