Skip to content

Commit 68f3295

Browse files
hf-kkleinKonstantinhf-krechanDeltaDaniel
authored
fix: remove time_packages (UB1, UB2, UB3) from packages results (#460)
* fix: remove `time_packages` (`UB1`, `UB2`, `UB3`) from packages results * fixed tests * Update unittests/test_cli_conditions.py Co-authored-by: kevin <[email protected]> --------- Co-authored-by: Konstantin <[email protected]> Co-authored-by: kevin <[email protected]> Co-authored-by: DeltaDaniel <[email protected]>
1 parent 04b5b0a commit 68f3295

File tree

4 files changed

+5758
-5931
lines changed

4 files changed

+5758
-5931
lines changed

src/kohlrahbi/conditions/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from kohlrahbi.ahb import get_pruefi_to_file_mapping
1111
from kohlrahbi.ahbtable.ahbcondtions import AhbConditions
1212
from kohlrahbi.ahbtable.ahbpackagetable import AhbPackageTable
13-
from kohlrahbi.conditions.allgemeine_festlegungen import time_conditions, time_packages
13+
from kohlrahbi.conditions.allgemeine_festlegungen import time_conditions
1414
from kohlrahbi.logger import logger
1515
from kohlrahbi.read_functions import get_all_conditions_from_doc
1616

@@ -57,6 +57,5 @@ def scrape_conditions(
5757
collected_packages.include_package_dict(packages.package_dict)
5858
collected_conditions.include_condition_dict(cond_table.conditions_dict)
5959
collected_conditions.include_condition_dict({edifact_format: time_conditions})
60-
collected_packages.include_package_dict({edifact_format: time_packages})
6160
collected_conditions.dump_as_json(output_path)
6261
collected_packages.dump_as_json(output_path)

src/kohlrahbi/conditions/allgemeine_festlegungen.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
"""
33
Contains conditions for times in allgemeine Festlegungen.
44
"""
5-
time_packages = {
6-
"UB1": "([931] ∧ [932] [490]) ⊻ ([931] ∧ [933] [491])",
7-
"UB2": "([931] ∧ [934] [490]) ⊻ ([931] ∧ [935] [491])",
8-
"UB3": "([931] ∧ [932] [492] ∧ [490]) ⊻ ([931] ∧ [933] [492] ∧ [491]) ⊻ ([931] ∧ [934] [493] ∧ [490]) ⊻ ([931] ∧ [935] [493] ∧ [491])",
9-
}
5+
# We decided against adding the time_packages to the regular packages.
6+
# The time-packages are resolved by a special transformer in AHBicht:
7+
# https://github.com/Hochfrequenz/ahbicht/blob/c51c81d2be098dd79ff52b754979892396207fe2/src/ahbicht/expressions/expression_resolver.py#L149
8+
109
time_conditions = {
1110
"490": "wenn Wert in diesem DE, an der Stelle CCYYMMDDHHMM ein Zeitpunkt aus dem angegeben Zeitraum der Tabelle Kapitel 3.5 „Übersicht gesetzliche deutsche Sommerzeit (MESZ)“ der Spalten:\n\t„Sommerzeit (MESZ) von“ Darstellung in UTC und\n\t„Sommerzeit (MESZ) bis“ Darstellung in UTC ist.",
1211
"491": "wenn Wert in diesem DE, an der Stelle CCYYMMDDHHMM ein Zeitpunkt aus dem angegeben Zeitraum der Tabelle Kapitel 3.6 „Übersicht gesetzliche deutsche Zeit (MEZ)“ der Spalten: \n\t„Winterzeit (MEZ) von“ Darstellung in UTC und\n\t„Winterzeit (MEZ) bis“ Darstellung in UTC ist.",

0 commit comments

Comments
 (0)