fundamend 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. fundamend-0.0.1/.github/dependabot.yml +18 -0
  2. fundamend-0.0.1/.github/workflows/coverage.yml +26 -0
  3. fundamend-0.0.1/.github/workflows/dependabot_automerge.yml +18 -0
  4. fundamend-0.0.1/.github/workflows/dev_test.yml +28 -0
  5. fundamend-0.0.1/.github/workflows/formatting.yml +27 -0
  6. fundamend-0.0.1/.github/workflows/no_byte_order_mark.yml +15 -0
  7. fundamend-0.0.1/.github/workflows/packaging_test.yml +26 -0
  8. fundamend-0.0.1/.github/workflows/python-publish.yml +61 -0
  9. fundamend-0.0.1/.github/workflows/pythonlint.yml +28 -0
  10. fundamend-0.0.1/.github/workflows/unittests.yml +26 -0
  11. fundamend-0.0.1/.gitignore +136 -0
  12. fundamend-0.0.1/.pre-commit-config.yaml +24 -0
  13. fundamend-0.0.1/LICENSE +21 -0
  14. fundamend-0.0.1/PKG-INFO +77 -0
  15. fundamend-0.0.1/README.md +55 -0
  16. fundamend-0.0.1/dev_requirements/requirements-coverage.in +2 -0
  17. fundamend-0.0.1/dev_requirements/requirements-coverage.txt +9 -0
  18. fundamend-0.0.1/dev_requirements/requirements-formatting.in +3 -0
  19. fundamend-0.0.1/dev_requirements/requirements-formatting.txt +21 -0
  20. fundamend-0.0.1/dev_requirements/requirements-linting.in +2 -0
  21. fundamend-0.0.1/dev_requirements/requirements-linting.txt +21 -0
  22. fundamend-0.0.1/dev_requirements/requirements-packaging.in +3 -0
  23. fundamend-0.0.1/dev_requirements/requirements-packaging.txt +72 -0
  24. fundamend-0.0.1/dev_requirements/requirements-spell_check.in +1 -0
  25. fundamend-0.0.1/dev_requirements/requirements-spell_check.txt +9 -0
  26. fundamend-0.0.1/dev_requirements/requirements-tests.in +2 -0
  27. fundamend-0.0.1/dev_requirements/requirements-tests.txt +15 -0
  28. fundamend-0.0.1/dev_requirements/requirements-type_check.in +2 -0
  29. fundamend-0.0.1/dev_requirements/requirements-type_check.txt +13 -0
  30. fundamend-0.0.1/domain-specific-terms.txt +8 -0
  31. fundamend-0.0.1/pyproject.toml +65 -0
  32. fundamend-0.0.1/requirements.txt +6 -0
  33. fundamend-0.0.1/src/_fundamend_version.py +1 -0
  34. fundamend-0.0.1/src/fundamend/__init__.py +9 -0
  35. fundamend-0.0.1/src/fundamend/models/__init__.py +5 -0
  36. fundamend-0.0.1/src/fundamend/models/messageimplementationguide.py +177 -0
  37. fundamend-0.0.1/src/fundamend/py.typed +2 -0
  38. fundamend-0.0.1/src/fundamend/reader/__init__.py +5 -0
  39. fundamend-0.0.1/src/fundamend/reader/migreader.py +212 -0
  40. fundamend-0.0.1/tox.ini +95 -0
@@ -0,0 +1,18 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "pip" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+ reviewers:
13
+ - "@Hochfrequenz/python-developers-review-team"
14
+ # Maintain dependencies for GitHub Actions
15
+ - package-ecosystem: "github-actions"
16
+ directory: "/"
17
+ schedule:
18
+ interval: "weekly"
@@ -0,0 +1,26 @@
1
+ name: "Coverage"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request: {}
7
+ jobs:
8
+ coverage:
9
+ runs-on: ${{ matrix.os }}
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.12"]
13
+ os: [ubuntu-latest]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python ${{ matrix.python-version }}
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install dependencies
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ pip install tox
24
+ - name: Run Tests and Record Coverage
25
+ run: |
26
+ tox -e coverage
@@ -0,0 +1,18 @@
1
+ name: Dependabot auto-approve / -merge
2
+ on: pull_request
3
+
4
+ jobs:
5
+ dependabot:
6
+ permissions:
7
+ contents: write
8
+ pull-requests: write
9
+ runs-on: ubuntu-latest
10
+ env:
11
+ PR_URL: ${{github.event.pull_request.html_url}}
12
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
13
+ if: ${{ github.actor == 'dependabot[bot]' }}
14
+ steps:
15
+ - name: Approve a PR
16
+ run: gh pr review --approve "$PR_URL"
17
+ - name: Enable auto-merge for Dependabot PRs
18
+ run: gh pr merge --auto --squash "$PR_URL"
@@ -0,0 +1,28 @@
1
+ name: "Test Dev Environment"
2
+ # Checks that the dev environment (tox -e dev) can be set up.
3
+ # This might not work, if different linting/testing envs refer to different versions of the same lib (e.g. typing-extensions).
4
+ # Different versions of the same package might work for isolated specific envs (only linting, only testing...) but the dev environment inherits from all of them.
5
+ on:
6
+ push:
7
+ branches: [main]
8
+ pull_request: {}
9
+ jobs:
10
+ check:
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11", "3.12"]
15
+ os: [ubuntu-latest]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install Dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install tox
26
+ - name: Create a Dev Environment
27
+ run: |
28
+ tox -e dev
@@ -0,0 +1,27 @@
1
+ name: "Formatting"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request: {}
7
+ jobs:
8
+ black:
9
+ runs-on: ${{ matrix.os }}
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.12"]
13
+ os: [ubuntu-latest]
14
+ tool: ["black", "isort"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install -r dev_requirements/requirements-formatting.txt
25
+ - name: ${{ matrix.tool }} Code Formatter
26
+ run: |
27
+ ${{ matrix.tool }} . --check
@@ -0,0 +1,15 @@
1
+ name: Prevent ByteOrderMarks
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request: {}
8
+
9
+ jobs:
10
+ bom-check:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: arma-actions/bom-check@v1
15
+ name: Check for BOM
@@ -0,0 +1,26 @@
1
+ name: "Packaging Test"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request: {}
7
+ jobs:
8
+ check_packaging:
9
+ runs-on: ${{ matrix.os }}
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.12"]
13
+ os: [ubuntu-latest]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python ${{ matrix.python-version }}
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install dependencies
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ pip install tox
24
+ - name: Run Packaging Test
25
+ run: |
26
+ tox -e test_packaging
@@ -0,0 +1,61 @@
1
+ # This GitHub workflow is only needed for python package releases which are supposed to be published on pypi.
2
+ # It requires the Github "environments" feature (see instructions below) it might not be available for private free accounts (but works for public or organization repos).
3
+ # After creating the "release" environment in the Github repo settings, you need to enter your Github organization/user name + repo name + "python-publish.yml" workflow file name in the PyPI UI to make this work.
4
+
5
+ # This workflow uploads a Python Package using Twine when a release is created.
6
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
7
+
8
+ name: Upload Python Package
9
+
10
+ on:
11
+ release:
12
+ types: [ created, edited ]
13
+
14
+ jobs:
15
+ tests:
16
+ if: startsWith(github.ref, 'refs/tags/v')
17
+ runs-on: ${{ matrix.os }}
18
+ strategy:
19
+ matrix:
20
+ python-version: [ "3.12" ]
21
+ os: [ ubuntu-latest ]
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Set up Python ${{ matrix.python-version }}
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: ${{ matrix.python-version }}
28
+ - name: Install tox
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install tox
32
+ - name: Run tox
33
+ run: |
34
+ tox
35
+
36
+ build-n-publish:
37
+ name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
38
+ runs-on: ubuntu-latest
39
+ # Specifying a GitHub environment, # Specifying a GitHub environment, which is strongly recommended by PyPI: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
40
+ # you have to create an environment in your repository settings and add the environment name here
41
+ environment: release
42
+ permissions:
43
+ # IMPORTANT: this permission is mandatory for trusted publishing
44
+ id-token: write
45
+ needs: tests
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+ - name: Set up Python
49
+ uses: actions/setup-python@v5
50
+ with:
51
+ python-version: ${{ matrix.python-version }}
52
+ - name: Install dependencies
53
+ run: |
54
+ python -m pip install --upgrade pip
55
+ pip install -r dev_requirements/requirements-packaging.txt
56
+ - name: Build wheel and source distributions
57
+ run: |
58
+ python -m build
59
+ - name: Publish distribution 📦 to PyPI
60
+ if: startsWith(github.ref, 'refs/tags/v')
61
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ name: "Linting"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request: {}
7
+ jobs:
8
+ pylint:
9
+ name: Python Code Quality and Lint
10
+ runs-on: ${{ matrix.os }}
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.12"]
14
+ os: [ubuntu-latest]
15
+ linter-env: ["linting", "type_check", "spell_check"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ - name: Install Dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install tox
26
+ - name: Run ${{ matrix.linter-env }} via Tox
27
+ run: |
28
+ tox -e ${{ matrix.linter-env }}
@@ -0,0 +1,26 @@
1
+ name: "Unittests"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request: {}
7
+ jobs:
8
+ pytest:
9
+ runs-on: ${{ matrix.os }}
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.11", "3.12"]
13
+ os: [ubuntu-latest]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python ${{ matrix.python-version }}
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install Dependencies
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ pip install tox
24
+ - name: Run the Unit Tests via Tox
25
+ run: |
26
+ tox -e tests
@@ -0,0 +1,136 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ .idea/
132
+
133
+ # vscode settings
134
+ .vscode/
135
+
136
+ src/_your_package_version.py
@@ -0,0 +1,24 @@
1
+ # to update all repo revisions just run: pre-commit autoupdate
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v4.4.0
5
+ hooks:
6
+ - id: check-yaml
7
+ - id: end-of-file-fixer
8
+ - id: trailing-whitespace
9
+ - repo: https://github.com/psf/black
10
+ rev: 23.9.1
11
+ hooks:
12
+ - id: black
13
+ language_version: python3
14
+ - repo: https://github.com/pycqa/isort
15
+ rev: 5.12.0
16
+ hooks:
17
+ - id: isort
18
+ name: isort (python)
19
+ - id: isort
20
+ name: isort (cython)
21
+ types: [cython]
22
+ - id: isort
23
+ name: isort (pyi)
24
+ types: [pyi]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Hochfrequenz Unternehmensberatung GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.3
2
+ Name: fundamend
3
+ Version: 0.0.1
4
+ Summary: XML basierte Formate und DatemModelle für die Energiewirtschaft in Deutschland
5
+ Project-URL: Changelog, https://github.com/Hochfrequenz/xml-fundamend/releases
6
+ Project-URL: Homepage, https://github.com/Hochfrequenz/xml-fundamend
7
+ Author-email: Hochfrequenz Unternehmensberatung GmbH <info+github@hochfrequenz.de>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: AHB,BDEW,MIG,Marktkommunikation,XML
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+
23
+ # FUNDAMEND - Formate und DAtenModelle für die ENergiewirtschaft in Deutschland
24
+
25
+ Dieses Repository enthält das Python-Paket `fundamend`.
26
+
27
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
28
+ ![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/fundamend.svg)
29
+ ![Pypi status badge](https://img.shields.io/pypi/v/fundamend)
30
+ ![Unittests status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Unittests/badge.svg)
31
+ ![Coverage status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Coverage/badge.svg)
32
+ ![Linting status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Linting/badge.svg)
33
+ ![Black status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Formatting/badge.svg)
34
+
35
+ ## Sinn und Zweck
36
+ Seit 2024 bietet der BDEW (endlich) maschinenlesbare MIG- und AHB-Spezifikationen an, wo zuvor nur PDF oder Word-Dateien veröffentlicht wurden.
37
+ Das ist ein wichtiger Schritt für eine echte Digitalisierung der Marktkommunikation im deutschen Energiemarkt.
38
+
39
+ Die nun maschinenlesbaren Informationen über den Aufgabe von EDIFACT-Nachrichten sind XML-basiert.
40
+
41
+ Dieses Repository enthält ein kleines Python-Paket, das die XML-Dateien einliest und als Python-Objekte zur Verfügung stellt, damit sich niemand mit XML herumschlagen muss.
42
+ Das ist alles.
43
+
44
+ ## Installation und Verwendung
45
+ Das Paket ist auf PyPI verfügbar und kann mit pip installiert werden:
46
+ ```bash
47
+ pip install fundamend
48
+ ```
49
+
50
+ ```python
51
+ from pathlib import Path
52
+ from fundamend import MigReader, MessageImplementationGuide
53
+
54
+ # Angenommen, mig_utilts.xml enthält:
55
+ # <?xml version="1.0" encoding="UTF-8"?>
56
+ # <M_UTILTS Versionsnummer="1.1c"
57
+ # Veroeffentlichungsdatum="24.10.2023"
58
+ # Author="BDEW">
59
+ # ...
60
+ # </M_UTILTS>
61
+
62
+ reader = MigReader(Path("pfad/zur/mig_utils.xml"))
63
+ mig = reader.read()
64
+ assert isinstance(mig, MessageImplementationGuide)
65
+ assert mig.format == "UTILTS"
66
+ ```
67
+
68
+ Aktuell (Version 0.1) können nur MIGs gelesen werden.
69
+ Der AHB-Teil soll aber folgen.
70
+
71
+ ## Verwendung und Mitwirken
72
+ Der Code ist MIT-lizenziert und kann daher frei verwendet werden.
73
+ Wir freuen uns über Pull Requests an den main-Branch dieses Repositories.
74
+
75
+ ## Hochfrequenz
76
+ Die [Hochfrequenz Unternehmensberatung GmbH](https://www.hochfrequenz.de) ist eine Beratung für Energieversorger im deutschsprachigen Raum.
77
+ Wir arbeiten größtenteils remote, haben aber auch Büros in Berlin, Bremen, Leipzig, Köln und Grünwald und attraktive [Stellenangebote](https://www.hochfrequenz.de/index.php/karriere/aktuelle-stellenausschreibungen/full-stack-entwickler).
@@ -0,0 +1,55 @@
1
+ # FUNDAMEND - Formate und DAtenModelle für die ENergiewirtschaft in Deutschland
2
+
3
+ Dieses Repository enthält das Python-Paket `fundamend`.
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+ ![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/fundamend.svg)
7
+ ![Pypi status badge](https://img.shields.io/pypi/v/fundamend)
8
+ ![Unittests status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Unittests/badge.svg)
9
+ ![Coverage status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Coverage/badge.svg)
10
+ ![Linting status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Linting/badge.svg)
11
+ ![Black status badge](https://github.com/Hochfrequenz/xml-fundamend-python/workflows/Formatting/badge.svg)
12
+
13
+ ## Sinn und Zweck
14
+ Seit 2024 bietet der BDEW (endlich) maschinenlesbare MIG- und AHB-Spezifikationen an, wo zuvor nur PDF oder Word-Dateien veröffentlicht wurden.
15
+ Das ist ein wichtiger Schritt für eine echte Digitalisierung der Marktkommunikation im deutschen Energiemarkt.
16
+
17
+ Die nun maschinenlesbaren Informationen über den Aufgabe von EDIFACT-Nachrichten sind XML-basiert.
18
+
19
+ Dieses Repository enthält ein kleines Python-Paket, das die XML-Dateien einliest und als Python-Objekte zur Verfügung stellt, damit sich niemand mit XML herumschlagen muss.
20
+ Das ist alles.
21
+
22
+ ## Installation und Verwendung
23
+ Das Paket ist auf PyPI verfügbar und kann mit pip installiert werden:
24
+ ```bash
25
+ pip install fundamend
26
+ ```
27
+
28
+ ```python
29
+ from pathlib import Path
30
+ from fundamend import MigReader, MessageImplementationGuide
31
+
32
+ # Angenommen, mig_utilts.xml enthält:
33
+ # <?xml version="1.0" encoding="UTF-8"?>
34
+ # <M_UTILTS Versionsnummer="1.1c"
35
+ # Veroeffentlichungsdatum="24.10.2023"
36
+ # Author="BDEW">
37
+ # ...
38
+ # </M_UTILTS>
39
+
40
+ reader = MigReader(Path("pfad/zur/mig_utils.xml"))
41
+ mig = reader.read()
42
+ assert isinstance(mig, MessageImplementationGuide)
43
+ assert mig.format == "UTILTS"
44
+ ```
45
+
46
+ Aktuell (Version 0.1) können nur MIGs gelesen werden.
47
+ Der AHB-Teil soll aber folgen.
48
+
49
+ ## Verwendung und Mitwirken
50
+ Der Code ist MIT-lizenziert und kann daher frei verwendet werden.
51
+ Wir freuen uns über Pull Requests an den main-Branch dieses Repositories.
52
+
53
+ ## Hochfrequenz
54
+ Die [Hochfrequenz Unternehmensberatung GmbH](https://www.hochfrequenz.de) ist eine Beratung für Energieversorger im deutschsprachigen Raum.
55
+ Wir arbeiten größtenteils remote, haben aber auch Büros in Berlin, Bremen, Leipzig, Köln und Grünwald und attraktive [Stellenangebote](https://www.hochfrequenz.de/index.php/karriere/aktuelle-stellenausschreibungen/full-stack-entwickler).
@@ -0,0 +1,2 @@
1
+ # specific requirements for the tox coverage env
2
+ coverage
@@ -0,0 +1,9 @@
1
+ # SHA1:6dafbcf610e9f81897b65ee9142715ab2e793f9e
2
+ #
3
+ # This file is autogenerated by pip-compile-multi
4
+ # To update, run:
5
+ #
6
+ # pip-compile-multi
7
+ #
8
+ coverage==7.5.1
9
+ # via -r dev_requirements/requirements-coverage.in
@@ -0,0 +1,3 @@
1
+ # specific requirements for the formatting envs
2
+ black
3
+ isort
@@ -0,0 +1,21 @@
1
+ # SHA1:2c7ffcd29222de3114c7f7994911f1b69d06b6b3
2
+ #
3
+ # This file is autogenerated by pip-compile-multi
4
+ # To update, run:
5
+ #
6
+ # pip-compile-multi
7
+ #
8
+ black==24.4.2
9
+ # via -r dev_requirements/requirements-formatting.in
10
+ click==8.1.7
11
+ # via black
12
+ isort==5.13.2
13
+ # via -r dev_requirements/requirements-formatting.in
14
+ mypy-extensions==1.0.0
15
+ # via black
16
+ packaging==24.0
17
+ # via black
18
+ pathspec==0.12.1
19
+ # via black
20
+ platformdirs==4.2.0
21
+ # via black
@@ -0,0 +1,2 @@
1
+ # specific requirements for the tox linting env
2
+ pylint
@@ -0,0 +1,21 @@
1
+ # SHA1:0e15f8789b9d62fe90d1f1b0b6a7e32f13b99b19
2
+ #
3
+ # This file is autogenerated by pip-compile-multi
4
+ # To update, run:
5
+ #
6
+ # pip-compile-multi
7
+ #
8
+ astroid==3.2.2
9
+ # via pylint
10
+ dill==0.3.8
11
+ # via pylint
12
+ isort==5.13.2
13
+ # via pylint
14
+ mccabe==0.7.0
15
+ # via pylint
16
+ platformdirs==4.2.0
17
+ # via pylint
18
+ pylint==3.2.2
19
+ # via -r dev_requirements/requirements-linting.in
20
+ tomlkit==0.12.4
21
+ # via pylint
@@ -0,0 +1,3 @@
1
+ # requirements for the hatchling build ssystem
2
+ build
3
+ twine