Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions emf/common/helpers/cgmes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pandas as pd
import config
from lxml import etree
from triplets.export_schema import schemas

logger = logging.getLogger(__name__)

Expand All @@ -15,14 +16,14 @@ def export_to_cgmes_zip(triplets: list):
"entsoe": "http://entsoe.eu/CIM/SchemaExtension/3/1#",
}

rdf_map = json.load(config.paths.cgm_worker.CGMES_v2_4_15_2014_08_07)
merged = pd.concat(triplets, ignore_index=True)

return pd.concat(triplets, ignore_index=True).export_to_cimxml(rdf_map=rdf_map,
namespace_map=namespace_map,
export_undefined=False,
export_type="xml_per_instance_zip_per_xml",
debug=False,
export_to_memory=True)
return merged.export_to_cimxml(rdf_map=schemas.ENTSOE_CGMES_2_4_15_552_ED1,
namespace_map=namespace_map,
export_undefined=False,
export_type="xml_per_instance_zip_per_xml",
debug=False,
export_to_memory=True)


def get_metadata_from_rdfxml(parsed_xml: etree._ElementTree):
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = [
"lxml",
"edx",
"opdm-api",
"triplets==0.0.11",
"triplets",
"ndjson",
"elasticsearch==8.15.0",
"minio",
Expand All @@ -21,6 +21,7 @@ dependencies = [
"pika",
"saxonche",
"croniter",
"pyarrow>=24.0.0",
]

[[tool.uv.index]]
Expand Down
Loading
Loading