mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-24 17:32:33 +02:00
2.8 KiB
2.8 KiB
Contribution guidelines
Dev Setup
- Install Python 3.11
- Install Poetry
- Install GiT
- Configure GiT
- Generate an SSH Key & Add SSH Key to GitHub
- Clone the Project (IDE Specific)
- Install the python Project
- Install pre-commit
Setup
Connection strings
Create a secrets.json
in the root of this repo with the following structure (values to be replaces by desired config):
{
"postgres": {
"username": "postgres",
"password": "postgres",
"host": "localhost",
"database": "postgres",
"port": 5432
},
"mongo": {
"username": "username",
"password": "password",
"host": "localhost",
"database": "transparenzregister",
"port": 27017
}
}
Example usage see connector.py
Code style
We defined to use the following formats:
- Whitespace Formatting by Black
- Docstrings Style see the examples provided by sphinx napoleon Types in the docstrings are optional but should be consistent per module.
- Import Order by isort
- Strict Typing of function headers see the examples provided by the mypy documentation.
Language
We decided to use english on everything close to code but will write longer texts that are not close to the code in german.
Pre-Commit Usage
- the following code format rules are so enforced:
- for more information read Python Pre-Commit