-
Notifications
You must be signed in to change notification settings - Fork 5
Add BO Bilanzierung and necessary COMs and ENUMs #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
4b612be
:construction: initialized bo bilanzierungs class
DeltaDaniel cff7eeb
Merge branch 'main' into DDB/issue-220_bilanzierung
DeltaDaniel 047546b
:construction: added Lastprofil-Klasse and testing functions.
DeltaDaniel 0dae7e2
Merge remote-tracking branch 'origin/DDB/issue-220_bilanzierung' into…
DeltaDaniel 3a1c1dc
Merge branch 'main' into DDB/issue-220_bilanzierung
DeltaDaniel 330f6f5
:construction: Update Formatierung
DeltaDaniel 5cd5503
:construction: fixed isort
DeltaDaniel 61d696c
:construction: added MaLo validator
DeltaDaniel 004e9bd
:construction: fixed minor issue in field validator in bilanzierung.py
DeltaDaniel 98d3692
:wastebasket: removed unused comment
DeltaDaniel 1ccf381
:wastebasket: removed unused comments -> required/optional attributes
DeltaDaniel 56cb779
:bulb: updated comments for field validators
DeltaDaniel 2d7432d
:wastebasket: removed depracted comment in enum botyp
DeltaDaniel 1bd5c00
:bulb: Updated description for enums.
DeltaDaniel 4c3a73e
:bulb: updated formatting of comments
DeltaDaniel df48f3f
:white_check_mark: added testsvariables to bo bilanzierung
DeltaDaniel a3b63de
Minor corrections
DeltaDaniel ce483ae
:white_check_mark: Fixed tests in bo
DeltaDaniel 636958b
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel d9173a0
Update tests/test_bilanzierung.py
DeltaDaniel 77bc400
typo/black/iso
DeltaDaniel e41bd3e
:memo: updated documentation
DeltaDaniel dfe3fcc
Merge branch 'main' into DDB/issue-220_bilanzierung
hf-fvesely fd4d6f4
Add new BO, COMs and ENUMs to init.py
hf-fvesely 1b12ba8
Remove validation and adapt test
hf-fvesely 09fc56f
Also adapt Lastprofil Test
hf-fvesely e20961e
And also Tagesparameter test
hf-fvesely f5ddd02
Merge remote-tracking branch 'origin/main' into DDB/issue-220_bilanzi…
hf-fvesely 2e263e6
Merge branch 'main' into DDB/issue-220_bilanzierung
DeltaDaniel d77e029
changed type of "verbrauchsaufteilung": float -> decimal
DeltaDaniel a727ad7
added missing import to __init__.py
DeltaDaniel 0df752b
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel ebac708
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel 33e8d5a
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel af0c214
Update src/bo4e/bo/bilanzierung.py
DeltaDaniel 6ba7dba
Update src/bo4e/com/lastprofil.py
DeltaDaniel b9a380c
Update src/bo4e/com/tagesparameter.py
DeltaDaniel a41916b
changed docstrings
DeltaDaniel e51afb3
Merge remote-tracking branch 'origin/main' into DDB/issue-220_bilanzi…
DeltaDaniel da463d7
Merge branch 'main' into DDB/issue-220_bilanzierung
hf-kklein 0168a4e
Add Abwicklungsmodell ENums to Bilanzierung
FreddyFox892 8bd851b
Update Profielart
FreddyFox892 bdb5e7b
black .
FreddyFox892 cc54dae
Merge remote-tracking branch 'origin/main' into DDB/issue-220_bilanzi…
hf-aschloegl b7d336d
Spell out Enums in Fallgruppenzuordnung
hf-aschloegl d448c8c
Adapt test data
hf-aschloegl 1aea56d
Adapt boolean name
hf-aschloegl 11ade49
Adapt tests for new boolean name
hf-aschloegl 83a567e
Remove wrong info in docstring
hf-aschloegl 519db12
Fix grammar
hf-aschloegl c301307
Adapt ENUM Abwicklungsmodell
hf-aschloegl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| """ | ||
| Contains class Bilanzierung | ||
| """ | ||
|
|
||
| from datetime import datetime | ||
| from decimal import Decimal | ||
| from typing import Annotated, Optional | ||
|
|
||
| from pydantic import Field | ||
|
|
||
| from bo4e.bo.geschaeftsobjekt import Geschaeftsobjekt | ||
| from bo4e.com.lastprofil import Lastprofil | ||
| from bo4e.com.menge import Menge | ||
| from bo4e.enum.aggregationsverantwortung import Aggregationsverantwortung | ||
| from bo4e.enum.fallgruppenzuordnung import Fallgruppenzuordnung | ||
| from bo4e.enum.profiltyp import Profiltyp | ||
| from bo4e.enum.prognosegrundlage import Prognosegrundlage | ||
| from bo4e.enum.wahlrechtprognosegrundlage import WahlrechtPrognosegrundlage | ||
| from bo4e.enum.zeitreihentyp import Zeitreihentyp | ||
|
|
||
| from ..enum.abwicklungsmodell import Abwicklungsmodell | ||
| from ..enum.typ import Typ | ||
|
|
||
|
|
||
| class Bilanzierung(Geschaeftsobjekt): | ||
| """ | ||
| Das BO Bilanzierung erfasst alle relevanten Informationen zur Bilanzierung. | ||
|
|
||
| .. raw:: html | ||
|
|
||
| <object data="../_static/images/bo4e/bo/Bilanzierung.svg" type="image/svg+xml"></object> | ||
|
|
||
| .. HINT:: | ||
| `Lastprofil JSON Schema <https://json-schema.app/view/%23?url=https://raw.githubusercontent.com/Hochfrequenz/BO4E-Schemas/{__gh_version__}/src/bo4e_schemas/bo/Bilanzierung.json>`_ | ||
|
|
||
| """ | ||
|
|
||
| typ: Annotated[Optional[Typ], Field(alias="_typ")] = Typ.BILANZIERUNG | ||
|
|
||
| marktlokations_id: Optional[str] = None #: ID der Marktlokation | ||
| lastprofil: Optional[list[Lastprofil]] = None #: Eine Liste der verwendeten Lastprofile (SLP, SLP/TLP, ALP etc.) | ||
| bilanzierungsbeginn: Optional[datetime] = None #: Inklusiver Start der Bilanzierung | ||
| bilanzierungsende: Optional[datetime] = None #: Exklusives Ende der Bilanzierung | ||
| bilanzkreis: Optional[str] = None #: Bilanzkreis | ||
| jahresverbrauchsprognose: Optional[Menge] = None #: Jahresverbrauchsprognose | ||
| temperatur_arbeit: Optional[Menge] = None #: Temperatur Arbeit | ||
| kundenwert: Optional[Menge] = None #: Kundenwert | ||
| verbrauchsaufteilung: Optional[Decimal] = None | ||
| """ | ||
| Verbrauchsaufteilung in % zwischen SLP und TLP-Profil. | ||
|
|
||
| 1. [Gemessene Energiemenge der OBIS "nicht Schwachlast"] * [Verbrauchsaufteilung in % / 100%] | ||
| = [zu verlagernde Energiemenge] | ||
| 2. [Gemessene Energiemenge der OBIS "Schwachlast"] - [zu verlagernde Energiemenge] | ||
| = [Ermittelte Energiemenge für Schwachlast] | ||
| 3. [Gemessene Energiemenge der OBIS "nicht Schwachlast"] + [zu verlagernde Energiemenge] | ||
| = [Ermittelte Energiemenge für nicht Schwachlast] | ||
| """ | ||
| zeitreihentyp: Optional[Zeitreihentyp] = None #: Zeitreihentyp (SLS, TLS, etc.) | ||
| aggregationsverantwortung: Optional[Aggregationsverantwortung] = None #: Aggregationsverantwortung | ||
| prognosegrundlage: Optional[Prognosegrundlage] = None #: Prognosegrundlage | ||
| details_prognosegrundlage: Optional[list[Profiltyp]] = None | ||
| """ | ||
| Prognosegrundlage. | ||
|
|
||
| Besteht der Bedarf ein tagesparameteräbhängiges Lastprofil mit gemeinsamer Messung anzugeben, | ||
| so ist dies über die 2 -malige Wiederholung des CAV Segments mit der Angabe der Codes E02 und E14 möglich. | ||
| """ | ||
| wahlrecht_prognosegrundlage: Optional[WahlrechtPrognosegrundlage] = None | ||
| """ | ||
| Wahlrecht der Prognosegrundlage. | ||
| """ | ||
| fallgruppenzuordnung: Optional[Fallgruppenzuordnung] = None #: Fallgruppenzuordnung (für gas RLM) | ||
| prioritaet: Optional[int] = None #: Priorität des Bilanzkreises (für Gas) | ||
| grund_wahlrecht_prognosegrundlage: Optional[WahlrechtPrognosegrundlage] = None | ||
| """ | ||
| Grund Wahlrecht der Prognosegrundlage. | ||
|
|
||
| true=Wahlrecht beim Lieferanten vorhanden | ||
| """ | ||
| abwicklungsmodell: Optional[Abwicklungsmodell] = None #: Abwicklungsmodell | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| """ | ||
| Contains class Lastprofil | ||
| """ | ||
|
|
||
| from typing import Optional | ||
|
|
||
| from bo4e.com.com import COM | ||
| from bo4e.com.tagesparameter import Tagesparameter | ||
| from bo4e.enum.profilart import Profilart | ||
| from bo4e.enum.profilverfahren import Profilverfahren | ||
|
|
||
|
|
||
| class Lastprofil(COM): | ||
| """ | ||
| Informationen zum Lastprofil. | ||
|
|
||
| .. raw:: html | ||
|
|
||
| <object data="../_static/images/bo4e/com/Lastprofil.svg" type="image/svg+xml"></object> | ||
|
|
||
| .. HINT:: | ||
| `Lastprofil JSON Schema <https://json-schema.app/view/%23?url=https://raw.githubusercontent.com/Hochfrequenz/BO4E-Schemas/{__gh_version__}/src/bo4e_schemas/com/Lastprofil.json>`_ | ||
|
|
||
| """ | ||
hf-aschloegl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| bezeichnung: Optional[str] = None #: Bezeichnung des Profils, durch DVGW bzw. den Netzbetreiber vergeben (z.B. H0) | ||
| profilschar: Optional[str] = ( | ||
| None #: Bezeichnung der Profilschar, durch DVGW bzw. den Netzbetreiber vergeben (z.B. H0) | ||
| ) | ||
| verfahren: Optional[Profilverfahren] = None #: Verfahren des Profils (analytisch oder synthetisch) | ||
| ist_einspeisung: Optional[bool] = None #: Einspeiseprofil: True/False | ||
| tagesparameter: Optional[Tagesparameter] = None #: Klimazone / Temperaturmessstelle | ||
| profilart: Optional[Profilart] = None #: Profilart des Lastprofils, e.g. ART_STANDARDLASTPROFIL | ||
| herausgeber: Optional[str] = None #: Herausgeber des Lastprofil-Codes, e.g. BDEW | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| """ | ||
| Contains tagesparameter class | ||
| """ | ||
|
|
||
| from typing import Optional | ||
|
|
||
| from bo4e.com.com import COM | ||
|
|
||
|
|
||
| class Tagesparameter(COM): | ||
| """ | ||
| Speichert Informationen zu einer tagesparameter abhängigen Messstelle. z.B. den Namen einer Klimazone oder die ID | ||
| der Wetterstation für die Temperaturmessstelle | ||
| """ | ||
|
|
||
| klimazone: Optional[str] = None #: Qualifier der Klimazone, e.g. 7624q | ||
| temperaturmessstelle: Optional[str] = None #: Qualifier der Temperaturmessstelle, e.g. 1234x | ||
| dienstanbieter: Optional[str] = None #: Dienstanbieter (bei Temperaturmessstellen), e.g. ZT1 | ||
| herausgeber: Optional[str] = None #: Herausgeber des Lastprofil-Codes, e.g. BDEW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # pylint: disable=missing-module-docstring | ||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Abwicklungsmodell(StrEnum): | ||
| """ | ||
| Art des Abwicklungsmodell (E-Mob) | ||
| """ | ||
|
|
||
| MODELL_1 = "MODELL_1" #: Modell 1 "Bilanzierung an der Marktlokation" | ||
| MODELL_2 = "MODELL_2" #: Modell 2 "Bilanzierung im Bilanzierungsgebiet (BG) des LPB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| """ | ||
| Contains class Aggregationsverantwortungs | ||
| """ | ||
|
|
||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Aggregationsverantwortung(StrEnum): | ||
| """ | ||
| Mögliche Qualifier für die Aggregationsverantwortung | ||
| """ | ||
|
|
||
| UENB = "UENB" #: Übertragungsnetzbetreiber | ||
| VNB = "VNB" #: Verteilnetzbetreiber |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| """ | ||
| Contains Enums for Fallgruppenzuordnung | ||
| """ | ||
|
|
||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Fallgruppenzuordnung(StrEnum): | ||
| """ | ||
| Fallgruppenzuordnung nach edi@energy | ||
| """ | ||
|
|
||
| GABI_RLM_MIT_TAGESBAND = "GABI_RLM_MIT_TAGESBAND" | ||
| """RLM mit Tagesband""" | ||
| GABI_RLM_OHNE_TAGESBAND = "GABI_RLM_OHNE_TAGESBAND" | ||
| """RLM ohne Tagesband""" | ||
| GABI_RLM_IM_NOMINIERUNGSERSATZVERFAHREN = "GABI_RLM_IM_NOMINIERUNGSERSATZVERFAHREN" | ||
| """RLM im Nominierungsersatzverfahren""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| """ | ||
| Contains Enums for Profilart. | ||
| """ | ||
|
|
||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Profilart(StrEnum): | ||
| """ | ||
| Profilart: temperaturabh./Standardlastprofil. | ||
| """ | ||
|
|
||
| ART_STANDARDLASTPROFIL = "ART_STANDARDLASTPROFIL" #: ART_STANDARDLASTPROFIL, Z02 | ||
| ART_TAGESPARAMETERABHAENGIGES_LASTPROFIL = "ART_TAGESPARAMETERABHAENGIGES_LASTPROFIL" | ||
| """ART_TAGESPARAMETERABHAENGIGES_LASTPROFIL, Z03""" | ||
| ART_LASTPROFIL = "ART_LASTPROFIL" #: ART_LASTPROFIL, Z12 | ||
| ART_STANDARDEINSPEISEPROFIL = "ART_STANDARDEINSPEISEPROFIL" #: ART_STANDARDEINSPEISEPROFIL, Z04 | ||
| ART_TAGESPARAMETERABHAENGIGES_EINSPEISEPROFIL = "ART_TAGESPARAMETERABHAENGIGES_EINSPEISEPROFIL" | ||
| #: ART_TAGESPARAMETERABHAENGIGES_EINSPEISEPROFIL, Z05 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| """ | ||
| Contains Enums for Profiltyp. | ||
| """ | ||
|
|
||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Profiltyp(StrEnum): | ||
| """ | ||
| Profiltyp (temperaturabhängig / Standardlastprofil). | ||
| """ | ||
|
|
||
| SLP_SEP = "SLP_SEP" #: SLP/SEP | ||
| TLP_TEP = "TLP_TEP" #: TLP/TEP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| """ | ||
| Contains Enums for Profilverfahren. | ||
| """ | ||
|
|
||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Profilverfahren(StrEnum): | ||
| """ | ||
| Profilverfahren: synthetisch/ analytisch. | ||
| """ | ||
|
|
||
| SYNTHETISCH = "SYNTHETISCH" #: SLP | ||
| ANALYTISCH = "ANALYTISCH" #: ALP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| """ | ||
| Contains Enums for Prognosegrundlage. | ||
| """ | ||
|
|
||
| from bo4e.enum.strenum import StrEnum | ||
|
|
||
|
|
||
| class Prognosegrundlage(StrEnum): | ||
| """ | ||
| Prognosegrundlage (WERTE, PROFILE). | ||
| """ | ||
|
|
||
| WERTE = "WERTE" #: Prognose auf Basis von Werten | ||
| PROFILE = "PROFILE" #: Prognose auf Basis von Profilen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
achtung kein bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
83a567e