mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-21 19:33:55 +02:00
Repo struktur dokumentieren (#75)
This commit is contained in:
@ -11,32 +11,26 @@
|
||||
- [Install the python Project](https://python-poetry.org/docs/basic-usage/#installing-dependencies)
|
||||
- [Install pre-commit](https://pre-commit.com/#install)
|
||||
|
||||
## Setup
|
||||
## Repository structure
|
||||
|
||||
### Connection strings
|
||||
- **src/`aki_prj23_transparenzregister`**:
|
||||
- This subfolder/`package` contains several subdirectories:
|
||||
- `ai`:
|
||||
- Houses AI models and pipelines, including NER and sentiment analysis.
|
||||
- `config`:
|
||||
- Contains configuration files such as database connection strings and model files.
|
||||
- `models`:
|
||||
- Stores data models.
|
||||
- `ui`:
|
||||
- Manages the user interface and dash interface.
|
||||
- `utils`:
|
||||
- Contains general tooling functions, including database access and other miscellaneous functions.
|
||||
|
||||
Create a `secrets.json` in the root of this repo with the following structure (values to be replaces by desired config):
|
||||
|
||||
```json
|
||||
{
|
||||
"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](./src/aki_prj23_transparenzregister/utils/postgres/connector.py)
|
||||
- **tests**:
|
||||
- Test files organized in a mirrored structure of the 'src' folder. Please at least import every python file you
|
||||
add.
|
||||
Please Try to test every function with a test that compares with an example result. If that is not possible it
|
||||
would be best to find a big consensus that only limited testing is required.
|
||||
|
||||
## Code style
|
||||
|
||||
@ -49,6 +43,10 @@ We defined to use the following formats:
|
||||
- Import Order by [isort](https://pycqa.github.io/isort/)
|
||||
- Strict Typing of function headers see the examples provided by
|
||||
the [mypy](https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html) documentation.
|
||||
- The generell linting is done by ruff but since ruff is a reimplementation of ruff of many different linters the old
|
||||
documentations are still valid.
|
||||
- Ruff can be executed with the `ruff .` command. May errors are auto-fixable with `ruff --fix .` if they are straight
|
||||
forward changes.
|
||||
|
||||
## Language
|
||||
|
||||
|
34
README.md
34
README.md
@ -1,13 +1,39 @@
|
||||
# aki_prj23_transparenzregister
|
||||
|
||||
[](https://github.com/astral-sh/ruff)
|
||||
[](https://www.python.org)
|
||||
[](https://github.com/astral-sh/ruff/actions)
|
||||
[](https://github.com/fhswf/aki_prj23_transparenzregister/actions/workflows/test-action.yaml)
|
||||
[](https://github.com/fhswf/aki_prj23_transparenzregister/actions/workflows/lint-actions.yaml)
|
||||
[](https://github.com/astral-sh/ruff)
|
||||
[](https://github.com/pre-commit/pre-commit)
|
||||
[](http://mypy-lang.org/)
|
||||
[](https://mypy.readthedocs.io/en/stable/?badge=stable)
|
||||
[](https://github.com/psf/black)
|
||||
|
||||
## Contributions
|
||||
|
||||
See the [CONTRIBUTING.md](CONTRIBUTING.md) about how code should be formatted and what kind of rules we set ourselves.
|
||||
|
||||
[](https://github.com/fhswf/aki_prj23_transparenzregister/actions/workflows/bandit-action.yaml)
|
||||
## DB Connection settings
|
||||
|
||||
To connect to the SQL db see [sql/connector.py](./src/aki_prj23_transparenzregister/utils/postgres/connector.py)
|
||||
To connect to the Mongo db see [connect]
|
||||
|
||||
Create a `secrets.json` in the root of this repo with the following structure (values to be replaces by desired config):
|
||||
|
||||
```json
|
||||
{
|
||||
"postgres": {
|
||||
"username": "postgres",
|
||||
"password": "postgres",
|
||||
"host": "localhost",
|
||||
"database": "postgres",
|
||||
"port": 5432
|
||||
},
|
||||
"mongo": {
|
||||
"username": "username",
|
||||
"password": "password",
|
||||
"host": "localhost",
|
||||
"database": "transparenzregister",
|
||||
"port": 27017
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -4,6 +4,11 @@ Transparenzregister Dokumentation
|
||||
=================================
|
||||
This is the documentation for the AKI project group on the german transparenzregister and an Analysis there of.
|
||||
|
||||
.. include:: ../README.md
|
||||
:parser: myst_parser.sphinx_
|
||||
.. include:: ../CONTRIBUTING.md
|
||||
:parser: myst_parser.sphinx_
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Project Management
|
||||
|
1
src/aki_prj23_transparenzregister/ai/__init__.py
Normal file
1
src/aki_prj23_transparenzregister/ai/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
"""This module contains all the ai pipelines."""
|
@ -1 +1 @@
|
||||
"""App configuration."""
|
||||
"""App configuration tools."""
|
||||
|
Reference in New Issue
Block a user