From 93696df833099a8ba9508ba8f6571c2654add7b2 Mon Sep 17 00:00:00 2001 From: DeltaDaniel Date: Tue, 27 Feb 2024 14:05:03 +0100 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=93=8Dpin=20virtualenv=20version=20in?= =?UTF-8?q?=20pyproject.toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit due to issues with tox --- dev_requirements/requirements-formatting.txt | 4 ++-- dev_requirements/requirements-linting.txt | 4 ++-- dev_requirements/requirements-type_check.txt | 2 +- pyproject.toml | 2 +- requirements.txt | 20 +++++++++++++++++++- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/dev_requirements/requirements-formatting.txt b/dev_requirements/requirements-formatting.txt index c68e628..51da02e 100644 --- a/dev_requirements/requirements-formatting.txt +++ b/dev_requirements/requirements-formatting.txt @@ -16,9 +16,9 @@ packaging==23.0 # via black pathspec==0.11.0 # via black -platformdirs==3.1.0 +platformdirs==4.2.0 # via black tomli==2.0.1 # via black -typing-extensions==4.9.0 +typing-extensions==4.10.0 # via black diff --git a/dev_requirements/requirements-linting.txt b/dev_requirements/requirements-linting.txt index 07bccdc..a1adc11 100644 --- a/dev_requirements/requirements-linting.txt +++ b/dev_requirements/requirements-linting.txt @@ -12,7 +12,7 @@ isort==5.13.2 # via pylint mccabe==0.7.0 # via pylint -platformdirs==3.1.0 +platformdirs==4.2.0 # via pylint pylint==3.1.0 # via -r dev_requirements/requirements-linting.in @@ -20,5 +20,5 @@ tomli==2.0.1 # via pylint tomlkit==0.11.6 # via pylint -typing-extensions==4.9.0 +typing-extensions==4.10.0 # via astroid diff --git a/dev_requirements/requirements-type_check.txt b/dev_requirements/requirements-type_check.txt index 284d4dd..ae75d65 100644 --- a/dev_requirements/requirements-type_check.txt +++ b/dev_requirements/requirements-type_check.txt @@ -10,5 +10,5 @@ mypy-extensions==1.0.0 # via mypy tomli==2.0.1 # via mypy -typing-extensions==4.9.0 +typing-extensions==4.10.0 # via mypy diff --git a/pyproject.toml b/pyproject.toml index 9d50c11..7e73d64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -dependencies = [] # add all the dependencies here +dependencies = ["virtualenv >= 20.25", "pydantic"] # add all the dependencies here dynamic = ["readme", "version"] [project.urls] diff --git a/requirements.txt b/requirements.txt index 79ca470..e0c0601 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,24 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile pyproject.toml # +annotated-types==0.6.0 + # via pydantic +distlib==0.3.8 + # via virtualenv +filelock==3.13.1 + # via virtualenv +platformdirs==4.2.0 + # via virtualenv +pydantic==2.6.2 + # via migmose (pyproject.toml) +pydantic-core==2.16.3 + # via pydantic +typing-extensions==4.10.0 + # via + # pydantic + # pydantic-core +virtualenv==20.25.1 + # via migmose (pyproject.toml) From 8babf02aba4fff18ee19ec35fb96a604c7c9a41c Mon Sep 17 00:00:00 2001 From: DeltaDaniel Date: Tue, 27 Feb 2024 14:06:04 +0100 Subject: [PATCH 2/8] init datamodell --- src/migmose/mig/__init__.py | 0 src/migmose/mig/baumdiagramm.py | 12 ++++++++++++ src/migmose/mig/nachrichtenstruktur.py | 15 +++++++++++++++ src/migmose/mig/nachrichtenstrukturzeile.py | 21 +++++++++++++++++++++ src/migmose/mig/segmentgruppe.py | 14 ++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 src/migmose/mig/__init__.py create mode 100644 src/migmose/mig/baumdiagramm.py create mode 100644 src/migmose/mig/nachrichtenstruktur.py create mode 100644 src/migmose/mig/nachrichtenstrukturzeile.py create mode 100644 src/migmose/mig/segmentgruppe.py diff --git a/src/migmose/mig/__init__.py b/src/migmose/mig/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/migmose/mig/baumdiagramm.py b/src/migmose/mig/baumdiagramm.py new file mode 100644 index 0000000..e7a4c86 --- /dev/null +++ b/src/migmose/mig/baumdiagramm.py @@ -0,0 +1,12 @@ +""" +contains class for trees consisting of segments of mig tables +""" + +from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile + + +class BaumSegmentGruppe(NachrichtenstrukturZeile): + """will contain the tree structure of nachrichtenstruktur tables""" + + segmente: list[NachrichtenstrukturZeile] + segmentgruppe: list["BaumSegmentGruppe"] diff --git a/src/migmose/mig/nachrichtenstruktur.py b/src/migmose/mig/nachrichtenstruktur.py new file mode 100644 index 0000000..77b9076 --- /dev/null +++ b/src/migmose/mig/nachrichtenstruktur.py @@ -0,0 +1,15 @@ +""" +contains class mig tables +""" + +from pydantic import BaseModel + +from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile + + +class NachrichtenstrukturTabelle(BaseModel): + """ + class for mig tables + """ + + lines: list[NachrichtenstrukturZeile] diff --git a/src/migmose/mig/nachrichtenstrukturzeile.py b/src/migmose/mig/nachrichtenstrukturzeile.py new file mode 100644 index 0000000..08bcf9b --- /dev/null +++ b/src/migmose/mig/nachrichtenstrukturzeile.py @@ -0,0 +1,21 @@ +""" +contains class for lines in mig tables +""" + +from pydantic import BaseModel + + +class NachrichtenstrukturZeile(BaseModel): + """ + class for lines in mig tables + """ + + zaehler: str + nr: str + bezeichnung: str + standard_status: str + bdew_status: str + standard_maximale_wiederholungen: int + bdew_maximale_wiederholungen: int + ebene: int + inhalt: str diff --git a/src/migmose/mig/segmentgruppe.py b/src/migmose/mig/segmentgruppe.py new file mode 100644 index 0000000..fc1bb48 --- /dev/null +++ b/src/migmose/mig/segmentgruppe.py @@ -0,0 +1,14 @@ +""" +contains class for structured segmentgroups in mig tables. builds table recursively. +""" + +from migmose.mig.zeile import NachrichtenStrukturZeile + + +class SegmentGruppe(NachrichtenStrukturZeile): + """ + class for structured segmentgroups in mig tables. builds table recursively. inherits from NachrichtenstrukturZeile + """ + + segmente: list[NachrichtenStrukturZeile] + segmentgruppe: list["SegmentGruppe"] From d2dd3145a395aa47bd0167c77ce6739f5ac67c56 Mon Sep 17 00:00:00 2001 From: DeltaDaniel Date: Tue, 27 Feb 2024 14:07:07 +0100 Subject: [PATCH 3/8] fix minor issue --- src/migmose/mig/segmentgruppe.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/migmose/mig/segmentgruppe.py b/src/migmose/mig/segmentgruppe.py index fc1bb48..17de768 100644 --- a/src/migmose/mig/segmentgruppe.py +++ b/src/migmose/mig/segmentgruppe.py @@ -1,14 +1,13 @@ """ contains class for structured segmentgroups in mig tables. builds table recursively. """ +from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile -from migmose.mig.zeile import NachrichtenStrukturZeile - -class SegmentGruppe(NachrichtenStrukturZeile): +class SegmentGruppe(NachrichtenstrukturZeile): """ class for structured segmentgroups in mig tables. builds table recursively. inherits from NachrichtenstrukturZeile """ - segmente: list[NachrichtenStrukturZeile] + segmente: list[NachrichtenstrukturZeile] segmentgruppe: list["SegmentGruppe"] From b633c2b3f6c52bfe22ddd633792cacaa01ca58c9 Mon Sep 17 00:00:00 2001 From: DeltaDaniel <139119540+DeltaDaniel@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:16:19 +0100 Subject: [PATCH 4/8] spell_check --- domain-specific-terms.txt | 1 + tox.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/domain-specific-terms.txt b/domain-specific-terms.txt index ee2a9a2..a836c7f 100644 --- a/domain-specific-terms.txt +++ b/domain-specific-terms.txt @@ -1 +1,2 @@ # contains 1 lower case word per line which are ignored in the spell_check +segmente diff --git a/tox.ini b/tox.ini index 3067e4d..2826330 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = linting coverage type_check + spell_check skip_missing_interpreters = True skipsdist = True From b18cc4ab79fb548f806b01f8b53235932c611c7c Mon Sep 17 00:00:00 2001 From: DeltaDaniel <139119540+DeltaDaniel@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:23:16 +0100 Subject: [PATCH 5/8] updated pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c020b3b..620f427 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,18 @@ # to update all repo revisions just run: pre-commit autoupdate repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.2.0 hooks: - id: black language_version: python3 - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: isort (python) From c35b4d9d7d34a60dcdb7732615ea8a9ad712c6ae Mon Sep 17 00:00:00 2001 From: DeltaDaniel <139119540+DeltaDaniel@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:25:02 +0100 Subject: [PATCH 6/8] black --- src/migmose/mig/segmentgruppe.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/migmose/mig/segmentgruppe.py b/src/migmose/mig/segmentgruppe.py index 17de768..2edce96 100644 --- a/src/migmose/mig/segmentgruppe.py +++ b/src/migmose/mig/segmentgruppe.py @@ -1,6 +1,7 @@ """ contains class for structured segmentgroups in mig tables. builds table recursively. """ + from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile From b9fe18ae2025a904bd00b48d1921eaeb2632eac3 Mon Sep 17 00:00:00 2001 From: Daniel <139119540+DeltaDaniel@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:09:38 +0100 Subject: [PATCH 7/8] Update pyproject.toml Co-authored-by: kevin <68426071+hf-krechan@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7e73d64..6acdc37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -dependencies = ["virtualenv >= 20.25", "pydantic"] # add all the dependencies here +dependencies = ["pydantic"] # add all the dependencies here dynamic = ["readme", "version"] [project.urls] From 4439b9ff6b9f3d40ed6561920ca673c4c96b8cdc Mon Sep 17 00:00:00 2001 From: Daniel <139119540+DeltaDaniel@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:09:58 +0100 Subject: [PATCH 8/8] Update src/migmose/mig/segmentgruppe.py Co-authored-by: kevin <68426071+hf-krechan@users.noreply.github.com> --- src/migmose/mig/segmentgruppe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migmose/mig/segmentgruppe.py b/src/migmose/mig/segmentgruppe.py index 2edce96..29fbc9f 100644 --- a/src/migmose/mig/segmentgruppe.py +++ b/src/migmose/mig/segmentgruppe.py @@ -1,5 +1,5 @@ """ -contains class for structured segmentgroups in mig tables. builds table recursively. +contains class for structured segmentgroups in mig tables. Builds table recursively. """ from migmose.mig.nachrichtenstrukturzeile import NachrichtenstrukturZeile