<commit_before>################
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 loose official support in the future.

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

.. _PEP8 style guide: https://www.python.org/dev/peps/pep-0008/
.. _PEP257 docstring conventions: https://www.python.org/dev/peps/pep-0257/

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.

Documentation
=============

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

.. _Sphinx documentation generator: http://www.sphinx-doc.org/en/stable/
.. _docstring: http://www.sphinx-doc.org/en/stable/ext/example_numpy.html?highlight=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 :ref:`Advanced properties <advanced-properties>` section, these types of properties are prefered.<commit_msg>Correct spelling<commit_after>################
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.

.. _PEP8 style guide: https://www.python.org/dev/peps/pep-0008/
.. _PEP257 docstring conventions: https://www.python.org/dev/peps/pep-0257/

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.

Documentation
=============

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

.. _Sphinx documentation generator: http://www.sphinx-doc.org/en/stable/
.. _docstring: http://www.sphinx-doc.org/en/stable/ext/example_numpy.html?highlight=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 :ref:`Advanced properties <advanced-properties>` section, these types of properties are prefered.

{'fraction_non_alphanumeric': 0.12423164024587512, 'fraction_numerical': 0.012293756065998059, 'mean_word_length': 5.246464646464647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1855002', 'n_tokens_mistral': 810, 'n_tokens_neox': 755, 'n_words': 340}