power-grid-model-io 1.3.5__py3-none-any.whl → 1.3.6__py3-none-any.whl
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.
Potentially problematic release.
This version of power-grid-model-io might be problematic. Click here for more details.
- power_grid_model_io/converters/__init__.py +2 -0
- power_grid_model_io/converters/base_converter.py +1 -0
- power_grid_model_io/converters/pandapower_converter.py +3 -3
- power_grid_model_io/converters/pgm_json_converter.py +1 -1
- power_grid_model_io/data_stores/vision_excel_file_store.py +1 -0
- power_grid_model_io/data_types/__init__.py +2 -0
- power_grid_model_io/functions/__init__.py +12 -0
- power_grid_model_io/mappings/tabular_mapping.py +1 -0
- power_grid_model_io/mappings/value_mapping.py +1 -0
- power_grid_model_io/utils/auto_id.py +1 -0
- power_grid_model_io/utils/dict.py +1 -0
- power_grid_model_io/utils/excel_ambiguity_checker.py +3 -3
- power_grid_model_io/utils/modules.py +1 -0
- {power_grid_model_io-1.3.5.dist-info → power_grid_model_io-1.3.6.dist-info}/METADATA +2 -1
- {power_grid_model_io-1.3.5.dist-info → power_grid_model_io-1.3.6.dist-info}/RECORD +18 -18
- {power_grid_model_io-1.3.5.dist-info → power_grid_model_io-1.3.6.dist-info}/WHEEL +0 -0
- {power_grid_model_io-1.3.5.dist-info → power_grid_model_io-1.3.6.dist-info}/licenses/LICENSE +0 -0
- {power_grid_model_io-1.3.5.dist-info → power_grid_model_io-1.3.6.dist-info}/top_level.txt +0 -0
|
@@ -8,3 +8,5 @@ Converters
|
|
|
8
8
|
from power_grid_model_io.converters.pandapower_converter import PandaPowerConverter
|
|
9
9
|
from power_grid_model_io.converters.pgm_json_converter import PgmJsonConverter
|
|
10
10
|
from power_grid_model_io.converters.vision_excel_converter import VisionExcelConverter
|
|
11
|
+
|
|
12
|
+
__all__ = ["PandaPowerConverter", "PgmJsonConverter", "VisionExcelConverter"]
|
|
@@ -461,7 +461,7 @@ class PandaPowerConverter(BaseConverter[PandaPowerData]):
|
|
|
461
461
|
}
|
|
462
462
|
if not all(checks.values()):
|
|
463
463
|
failed_checks = ", ".join([key for key, value in checks.items() if not value])
|
|
464
|
-
logger.warning(
|
|
464
|
+
logger.warning("Zero sequence parameters given in external grid shall be ignored: %s", failed_checks)
|
|
465
465
|
|
|
466
466
|
pgm_sources = initialize_array(data_type="input", component_type="source", shape=len(pp_ext_grid))
|
|
467
467
|
pgm_sources["id"] = self._generate_ids("ext_grid", pp_ext_grid.index)
|
|
@@ -753,7 +753,7 @@ class PandaPowerConverter(BaseConverter[PandaPowerData]):
|
|
|
753
753
|
}
|
|
754
754
|
if not all(checks.values()):
|
|
755
755
|
failed_checks = ", ".join([key for key, value in checks.items() if not value])
|
|
756
|
-
logger.warning(
|
|
756
|
+
logger.warning("Zero sequence parameters given in trafo shall be ignored: %s", failed_checks)
|
|
757
757
|
|
|
758
758
|
# Do not use taps when mandatory tap data is not available
|
|
759
759
|
no_taps = np.equal(tap_side, None) | np.isnan(tap_pos) | np.isnan(tap_nom) | np.isnan(tap_size)
|
|
@@ -862,7 +862,7 @@ class PandaPowerConverter(BaseConverter[PandaPowerData]):
|
|
|
862
862
|
}
|
|
863
863
|
if not all(checks.values()):
|
|
864
864
|
failed_checks = ", ".join([key for key, value in checks.items() if not value])
|
|
865
|
-
logger.warning(
|
|
865
|
+
logger.warning("Zero sequence parameters given in trafo3w are ignored: %s", failed_checks)
|
|
866
866
|
|
|
867
867
|
# Do not use taps when mandatory tap data is not available
|
|
868
868
|
no_taps = np.equal(tap_side, None) | np.isnan(tap_pos) | np.isnan(tap_nom) | np.isnan(tap_size)
|
|
@@ -238,7 +238,7 @@ class PgmJsonConverter(BaseConverter[StructuredData]):
|
|
|
238
238
|
"""
|
|
239
239
|
|
|
240
240
|
# This should be a single data set
|
|
241
|
-
for
|
|
241
|
+
for array in data.values():
|
|
242
242
|
if not isinstance(array, np.ndarray) or array.ndim != 1:
|
|
243
243
|
raise ValueError("Invalid data format")
|
|
244
244
|
|
|
@@ -7,3 +7,5 @@ Common data types used in the Power Grid Model project
|
|
|
7
7
|
|
|
8
8
|
from power_grid_model_io.data_types._data_types import ExtraInfo, ExtraInfoLookup, StructuredData
|
|
9
9
|
from power_grid_model_io.data_types.tabular_data import LazyDataFrame, TabularData
|
|
10
|
+
|
|
11
|
+
__all__ = ["ExtraInfo", "ExtraInfoLookup", "StructuredData", "LazyDataFrame", "TabularData"]
|
|
@@ -17,3 +17,15 @@ from power_grid_model_io.functions._functions import (
|
|
|
17
17
|
value_or_default,
|
|
18
18
|
value_or_zero,
|
|
19
19
|
)
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"both_zeros_to_nan",
|
|
23
|
+
"complex_inverse_imaginary_part",
|
|
24
|
+
"complex_inverse_real_part",
|
|
25
|
+
"degrees_to_clock",
|
|
26
|
+
"get_winding",
|
|
27
|
+
"has_value",
|
|
28
|
+
"is_greater_than",
|
|
29
|
+
"value_or_default",
|
|
30
|
+
"value_or_zero",
|
|
31
|
+
]
|
|
@@ -19,6 +19,7 @@ Requirements:
|
|
|
19
19
|
- xml.etree.ElementTree for parsing XML structures within the Excel file.
|
|
20
20
|
- zipfile to handle the Excel file as a ZIP archive for parsing.
|
|
21
21
|
"""
|
|
22
|
+
|
|
22
23
|
import os
|
|
23
24
|
import xml.etree.ElementTree as ET
|
|
24
25
|
import zipfile
|
|
@@ -80,11 +81,10 @@ class ExcelAmbiguityChecker:
|
|
|
80
81
|
list: A list of shared strings used in the Excel file.
|
|
81
82
|
"""
|
|
82
83
|
shared_strings_path = SHARED_STR_PATH
|
|
83
|
-
shared_strings = []
|
|
84
|
+
shared_strings: List[Optional[str]] = []
|
|
84
85
|
with zip_file.open(shared_strings_path) as f:
|
|
85
86
|
tree = ET.parse(f)
|
|
86
|
-
for si in tree.findall(FIND_T, namespaces=XML_NAME_SPACE)
|
|
87
|
-
shared_strings.append(si.text)
|
|
87
|
+
shared_strings.extend(si.text for si in tree.findall(FIND_T, namespaces=XML_NAME_SPACE))
|
|
88
88
|
return shared_strings
|
|
89
89
|
|
|
90
90
|
def _get_column_names_from_row(self, row, shared_strings) -> List[Optional[str]]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: power-grid-model-io
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: Power Grid Model Input/Output
|
|
5
5
|
Author-email: Contributors to the Power Grid Model project <powergridmodel@lfenergy.org>
|
|
6
6
|
License: MPL-2.0
|
|
@@ -33,6 +33,7 @@ Requires-Dist: pre-commit; extra == "dev"
|
|
|
33
33
|
Requires-Dist: pylint; extra == "dev"
|
|
34
34
|
Requires-Dist: pytest; extra == "dev"
|
|
35
35
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff; extra == "dev"
|
|
36
37
|
Requires-Dist: pydantic>2; extra == "dev"
|
|
37
38
|
Requires-Dist: pandapower>2.11.1; extra == "dev"
|
|
38
39
|
Provides-Extra: examples
|
|
@@ -8,10 +8,10 @@ power_grid_model_io/config/excel/vision_en.yaml,sha256=z4AQXSlrC3_pj-ul1KlbZh6Uj
|
|
|
8
8
|
power_grid_model_io/config/excel/vision_en_9_7.yaml,sha256=ts_qcrO3Gd8tQwPFzGWEbqs1-FrKb5yMOD_G_JbOP7I,21161
|
|
9
9
|
power_grid_model_io/config/excel/vision_en_9_8.yaml,sha256=yCa4v5VUK1xCZ0PrHG2ZflpIZN-D7dNsS7PKYW8K9Ac,20938
|
|
10
10
|
power_grid_model_io/config/excel/vision_nl.yaml,sha256=0IOh5Ug9QwP2dgNMsl90RARV_v-xxcA6rv8Ya0WCPuI,21426
|
|
11
|
-
power_grid_model_io/converters/__init__.py,sha256=
|
|
12
|
-
power_grid_model_io/converters/base_converter.py,sha256=
|
|
13
|
-
power_grid_model_io/converters/pandapower_converter.py,sha256=
|
|
14
|
-
power_grid_model_io/converters/pgm_json_converter.py,sha256=
|
|
11
|
+
power_grid_model_io/converters/__init__.py,sha256=qng1-O8kfpgalPms_C_zAwBuiuKUoquf27u6JkVH-9k,487
|
|
12
|
+
power_grid_model_io/converters/base_converter.py,sha256=EAtwQdj-MCi3XLm3qjKNJgXd6i3QdULaPa79jCD0vZg,6049
|
|
13
|
+
power_grid_model_io/converters/pandapower_converter.py,sha256=yasj_Yibe9TsGFPT888ayWoDI0KDbMfB7kNpdpxwe0k,115806
|
|
14
|
+
power_grid_model_io/converters/pgm_json_converter.py,sha256=20q4U1pZHqEbmPpktmr4ScDT1ZAxYm0u4Z7MM-pqPvc,13846
|
|
15
15
|
power_grid_model_io/converters/tabular_converter.py,sha256=VqC8efgfum4GcHet_co21pfTn2HIipuDN22Qoq4Gs3s,35288
|
|
16
16
|
power_grid_model_io/converters/vision_excel_converter.py,sha256=ahAhynkHp_rchDIS0xEYRj4MmcJtc5YPcQTItNXa7tI,4185
|
|
17
17
|
power_grid_model_io/data_stores/__init__.py,sha256=qwbj1j-Aa_yRB-E3j35pEVtF3mgH8CVIXAnog5mOry0,138
|
|
@@ -19,32 +19,32 @@ power_grid_model_io/data_stores/base_data_store.py,sha256=DJfLtRwvx_tXKnpjtBdfbM
|
|
|
19
19
|
power_grid_model_io/data_stores/csv_dir_store.py,sha256=H8ICXZRLDvp9OkbjkfHnoh4y7uNSXNepHAW6W53VsIw,1877
|
|
20
20
|
power_grid_model_io/data_stores/excel_file_store.py,sha256=uyEwCzFzIt09QY5aI7D0ZtxBTpBhb81Yw4iOF8FMTv0,10868
|
|
21
21
|
power_grid_model_io/data_stores/json_file_store.py,sha256=0njL2YZn_fImNcZqnIRpHp2UtIS6WGaQQ46TjIK8tyo,3954
|
|
22
|
-
power_grid_model_io/data_stores/vision_excel_file_store.py,sha256=
|
|
23
|
-
power_grid_model_io/data_types/__init__.py,sha256=
|
|
22
|
+
power_grid_model_io/data_stores/vision_excel_file_store.py,sha256=QJjT6lfqfRG4Zt8Lsm81hNwjZa5Z_6dndUfwUIyPN3Q,1060
|
|
23
|
+
power_grid_model_io/data_types/__init__.py,sha256=cTHmwEVWQsjogGzMUhZ5wb79l3CaFyqa1If0_XCL65w,477
|
|
24
24
|
power_grid_model_io/data_types/_data_types.py,sha256=9xH5vBGrRVUSlPh4HXmORtKo3LFEhJEy3iTQqG7wsFA,1664
|
|
25
25
|
power_grid_model_io/data_types/tabular_data.py,sha256=sV6S4kqCEuQiNZTOdKS7CiA2M8Ny1oGXvtFoN-xkYBg,8582
|
|
26
|
-
power_grid_model_io/functions/__init__.py,sha256=
|
|
26
|
+
power_grid_model_io/functions/__init__.py,sha256=l1PjXVh21UTlWmv3j_KvflEymTUcGNxm8BDDpt1jUYc,734
|
|
27
27
|
power_grid_model_io/functions/_functions.py,sha256=tqwwZ0G8AeDza0IiS6CSMwKB0lV1hDo2D8e9-ARHXQM,2843
|
|
28
28
|
power_grid_model_io/functions/filters.py,sha256=zJAGkUg8x-Ci6IJkbCwhVJuj9eKsPY-BxfjdyWMEl8A,1398
|
|
29
29
|
power_grid_model_io/functions/phase_to_phase.py,sha256=Cufj3lcUESKa_AFHn27GsUMxjTFmF5mj0-sdFrE7V00,4495
|
|
30
30
|
power_grid_model_io/mappings/__init__.py,sha256=qwbj1j-Aa_yRB-E3j35pEVtF3mgH8CVIXAnog5mOry0,138
|
|
31
31
|
power_grid_model_io/mappings/field_mapping.py,sha256=YfrwKolNG06kIC1sbUYnYmxuOrbNbNo1dYtnF8rNItw,1659
|
|
32
32
|
power_grid_model_io/mappings/multiplier_mapping.py,sha256=mQ112SMbuIgCZ1haMOxMtfbn2kMsaMaYSfEGv73gSGQ,910
|
|
33
|
-
power_grid_model_io/mappings/tabular_mapping.py,sha256=
|
|
33
|
+
power_grid_model_io/mappings/tabular_mapping.py,sha256=qlD4NIU-8Ezg3jNzL3OHXJ8WQoKRMLFjaDH6mqYy-LY,1831
|
|
34
34
|
power_grid_model_io/mappings/unit_mapping.py,sha256=Z6DGp5Z7f0kLbcU9oih466at1OHAGzWdYeSZF9DGpnI,2933
|
|
35
|
-
power_grid_model_io/mappings/value_mapping.py,sha256=
|
|
35
|
+
power_grid_model_io/mappings/value_mapping.py,sha256=ed5fqt9RAYw_YN4yfxozVDNtyxayLV5up51CQIjoDRk,1247
|
|
36
36
|
power_grid_model_io/utils/__init__.py,sha256=qwbj1j-Aa_yRB-E3j35pEVtF3mgH8CVIXAnog5mOry0,138
|
|
37
|
-
power_grid_model_io/utils/auto_id.py,sha256=
|
|
38
|
-
power_grid_model_io/utils/dict.py,sha256=
|
|
37
|
+
power_grid_model_io/utils/auto_id.py,sha256=i-furb-G7zvQVbyqQLoNT17patN45dQrxl4eXLJ-p1o,4123
|
|
38
|
+
power_grid_model_io/utils/dict.py,sha256=HTepnXhEnyBDfDrDm21c5DIlMEO1o5ShMSSnUGm2rDE,1015
|
|
39
39
|
power_grid_model_io/utils/download.py,sha256=enEoj42ByC5j5rj_iZ1Y9we7t8Nmlwre0-9Njon-Tqg,9457
|
|
40
|
-
power_grid_model_io/utils/excel_ambiguity_checker.py,sha256=
|
|
40
|
+
power_grid_model_io/utils/excel_ambiguity_checker.py,sha256=11hkzMuJHMpTIM7uf1AH3Wcs9Q3hfjEmXORIk1IfE_s,6923
|
|
41
41
|
power_grid_model_io/utils/json.py,sha256=dQDRd2Vb8pfqLU2hTuWYv2cpSIBBbFhd0LOBP21YxJI,3327
|
|
42
|
-
power_grid_model_io/utils/modules.py,sha256=
|
|
42
|
+
power_grid_model_io/utils/modules.py,sha256=DJLmYKt9cV_GvqJI8wkXppNycqD4b8n5-o_87XXfQbc,929
|
|
43
43
|
power_grid_model_io/utils/parsing.py,sha256=cw6d3S89BvB8dncN0SeFHDhFG7ZlDNx9iGYWjZk5fVU,4684
|
|
44
44
|
power_grid_model_io/utils/uuid_excel_cvtr.py,sha256=xYAYevGDuBd-TcgqcEMJJsISg3yv3uO_9mcUd7oj1qQ,7600
|
|
45
45
|
power_grid_model_io/utils/zip.py,sha256=VXHX4xWPPZbhOlZUAbMDy3MgQFzK6_l7sRvGXihNUY4,3875
|
|
46
|
-
power_grid_model_io-1.3.
|
|
47
|
-
power_grid_model_io-1.3.
|
|
48
|
-
power_grid_model_io-1.3.
|
|
49
|
-
power_grid_model_io-1.3.
|
|
50
|
-
power_grid_model_io-1.3.
|
|
46
|
+
power_grid_model_io-1.3.6.dist-info/licenses/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
|
|
47
|
+
power_grid_model_io-1.3.6.dist-info/METADATA,sha256=y3wtU1iHlNjlGhGUxKz7406hXUEeGds2zH9XQRthfHQ,8195
|
|
48
|
+
power_grid_model_io-1.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
49
|
+
power_grid_model_io-1.3.6.dist-info/top_level.txt,sha256=7sq9VveemMm2R0RgTBa4tH8y_xF4_1hxbufmX9OjCTo,20
|
|
50
|
+
power_grid_model_io-1.3.6.dist-info/RECORD,,
|
|
File without changes
|
{power_grid_model_io-1.3.5.dist-info → power_grid_model_io-1.3.6.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|