Commit 6ee252ef authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Merge branch 'python1' into 'master'

Added Python language

See merge request !25
parents 71842992 a78acbb8
PHP Language
Coding guideline
## 1. Directory layout
To ensure all our repositories follow the same layout, source code should be stored in the `src/` folder.
Tests should either be setup within the `src/` folder or within a dedicated `tests/` folder.
## 2. Styling
Code must adhere to [PEP 8 -- Style Guide for Python Code](
## 3. Linting
Linting should be setup to run automatically during tests.
See [Example](#5.1. Code coverage and linting)
## 4. Code coverage
Code coverage should be setup to ensure tests run through as much code as possible.
See [Example](#5.1. Code coverage and linting)
## 5. Examples
### 5.1. Code coverage and linting
Here is an example of the `` file...
""" Example """
from setuptools import setup, find_packages
package_dir={'': 'src'},
Here is the associated `setup.cfg` file...
addopts = --pylint --cov=src/ tests/
Here is an example of a `.coveragerc` file...
branch = True
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
......@@ -4,4 +4,6 @@
[Perl Coding Policy](
[Python Coding Policy](
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment