Skip to content
Update Rules authored by Christoph Deneke's avatar Christoph Deneke
## Overview
Here some general thoughts on coding rules: Here some general thoughts on coding rules:
- Follow PEP8, if possible. Also read PEP20 and follow it by idea and spirit. - Follow PEP8, if possible. Also read PEP20 and follow it by idea and spirit.
...@@ -5,6 +7,8 @@ Here some general thoughts on coding rules: ...@@ -5,6 +7,8 @@ Here some general thoughts on coding rules:
- Read books like "Python Tricks" or "Fluent Python" and follow the suggestions. One is that we want to use with-statements with all database actions (see issue tracker). - Read books like "Python Tricks" or "Fluent Python" and follow the suggestions. One is that we want to use with-statements with all database actions (see issue tracker).
- Code should be formatted by "black" with 105 character per line. - Code should be formatted by "black" with 105 character per line.
## Variables
We have a set of reserved variables that should be used throughout the project: We have a set of reserved variables that should be used throughout the project:
| Variable| What for| Exception| | Variable| What for| Exception|
...@@ -25,3 +29,9 @@ Beside this, more relaxed, the use of following things is suggested: ...@@ -25,3 +29,9 @@ Beside this, more relaxed, the use of following things is suggested:
| ------ | ------ | | ------ | ------ |
| mtype | Measurement type database entry | | mtype | Measurement type database entry |
| ttype | Template type | | ttype | Template type |
## Documentation
All functions should have a docsstring following the [numpy style](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard).
We encorage to do typing of the variable inside the docstring.
\ No newline at end of file