Add a cli interface to choose a configuration (#163)

- [x] add a cli to the webserver to take env variables into account 
- [x] add a cli to the data processing that takes enviromental variable
as a valid source into account
- [x] rework the cli for the reset sql command
- [x] rework the cli for the copying of sql data from one db to another
This commit is contained in:
2023-10-02 20:31:42 +02:00
committed by GitHub
parent 2abe12f027
commit d2d4a436f8
22 changed files with 650 additions and 304 deletions

View File

@ -6,7 +6,7 @@ requires = ["poetry-core"]
target-version = ["py311"]
[tool.coverage.report]
exclude_also = ["if __name__ == .__main__.:", "if not isinstance(engine, Engine):"]
exclude_also = ["if __name__ == .__main__.:", "if not isinstance(engine, Engine):", "@overload"]
[tool.coverage.run]
branch = true
@ -69,7 +69,7 @@ tqdm = "^4.66.1"
xmltodict = "^0.13.0"
[tool.poetry.extras]
ingest = ["selenium", "deutschland"]
ingest = ["selenium", "deutschland", "xmltodict"]
processing = []
web-server = ["dash", "dash-auth", "dash-bootstrap-components", "matplotlib", "seaborn"]
@ -119,8 +119,8 @@ pytest-repeat = "^0.9.1"
[tool.poetry.scripts]
copy-sql = "aki_prj23_transparenzregister.utils.sql.copy_sql:copy_db_cli"
data-transfer = {reference = "aki_prj23_transparenzregister.utils.data_transfer:transfer_data", extras = ["processing"], type = "console"}
reset-sql = {reference = "aki_prj23_transparenzregister.utils.sql.connector:reset_all_tables", extras = ["processing"], type = "console"}
data-processing = "aki_prj23_transparenzregister.utils.data_transfer:transfer_data_cli"
reset-sql = "aki_prj23_transparenzregister.utils.sql.connector:reset_all_tables_cli"
webserver = "aki_prj23_transparenzregister.ui.app:main"
[tool.ruff]