All comments to be in the form of block comments as seen here:
Variable names to be relevant to their intended purpose and named in the form:
Function names to follow same convention as variables. Block comments making up a Docstring must be placed on the first line of the function.
Every parameter must be accompanied an expected type in the form <Param Name>:<Expected type>.
Following the parameter declarations we use function annotation, ->, to show what our return type will be:
When defining lists or passing many parameters to functions,
place individual parameters on separate lines for readability and
in general try to adhere to Python's recommended maximum line length:
Console output should be performed through the logging python package as opposed to using print:
If DEBUG was set to False, the first INFO message would not be displayed as the minimum logging level would be WARNING.
All unused variables and all unnecessary logging to be removed BEFORE commiting to git unless specifically required.
Full code coverage tests to be added as soon as possible following function completion, all unreachable code must be removed. For proper format see tests\test_example_name.py
Test files should be placed in the test directory and names should be prefixed with "test_" as shown here:
Running the command 'make test' will automatically import and run all tests in the test directory providing code coverage at the bottom:
In order to add python packages, firstly the package must be verified to be open source, secondly the package should be well maintained in order to avoid compatibility issues, and finally the package name must be formatted as shown. Adding new python packages should be done by appending a new line to the requirements.txt and should contain the package name as it appears in the Python Package Index, a version number should also be specified formatting the line as <Package Name>==<Version Number>, eg. to add the pyaudio package; PyAudio==0.2.11.
In the case of additional linux packages being required we follow the same open source and maintenance guidelines as our python packages but rather than add them to the requirements.txt we append the package name to line 3 of the Dockerfile:
Alter lines 1,2,4,+ at own risk.
Full documentation is required for all functionality, this is both in the form of the docstring within each function as well as an example_name.txt file in the docs folder:
The file example.py will have a corresponding example_doc.txt in the documents folder.