Commit 712df574 authored by Richard Marston's avatar Richard Marston
Browse files

Build cimpy in Dockerfile

Merge fixes
parent c3ff5085
Pipeline #335281 passed with stages
in 2 minutes and 54 seconds
......@@ -28,6 +28,8 @@ RUN pip3 install pytest
RUN pip3 install pytest-check
# ADD . /cimpy
ADD . /cimpy
# WORKDIR /cimpy
\ No newline at end of file
WORKDIR /cimpy
RUN python3 setup.py install
......@@ -2,7 +2,7 @@ from enum import Enum
# Mapping between the profiles and their short names
short_profile_name = {
"DiagramLayout": 'DI',
"DiagramLayout": 'DL',
"Dynamics": "DY",
"Equipment": "EQ",
"GeographicalLocation": "GL",
......@@ -11,6 +11,7 @@ short_profile_name = {
"Topology": "TP"
}
long_profile_name = {
'DL': "DiagramLayout",
'DI': "DiagramLayout",
"DY": "Dynamics",
"EQ": "Equipment",
......
......@@ -22,6 +22,6 @@ import_result = cimpy.cim_import(xml_files, "cgmes_v2_4_15")
import_result = cimpy.utils.add_external_network_injection(import_result, "cgmes_v2_4_15", "N1", 20.0)
activeProfileList = ['DI', 'EQ', 'SV', 'TP']
activeProfileList = ['DL', 'EQ', 'SV', 'TP']
cimpy.cim_export(import_result, 'ExternalInjection', 'cgmes_v2_4_15', activeProfileList)
......@@ -23,6 +23,6 @@ import_result = cimpy.cim_import(xml_files, "cgmes_v2_4_15")
import_result = cimpy.utils.node_breaker_to_bus_branch(import_result)
activeProfileList = ['DI', 'EQ', 'TP']
activeProfileList = ['DL', 'EQ', 'TP']
cimpy.cim_export(import_result, 'Bus_Branch_Converted', 'cgmes_v2_4_15', activeProfileList)
......@@ -19,6 +19,6 @@ for file in sample_folder.glob('*.xml'):
import_result = cimpy.cim_import(xml_files, "cgmes_v2_4_15")
activeProfileList = ['DI', 'EQ', 'SV', 'TP']
activeProfileList = ['DL', 'EQ', 'SV', 'TP']
cimpy.cim_export(import_result, 'CIGREMV_reference_cgmes_v2_4_15', 'cgmes_v2_4_15', activeProfileList)
......@@ -8,7 +8,7 @@ from pathlib import Path
logging.basicConfig(filename='Test_export_with_exported_files.log', level=logging.INFO, filemode='w')
short_profile_name = {
"DiagramLayout": 'DI',
"DiagramLayout": 'DL',
"Dynamics": "DY",
"Equipment": "EQ",
"GeographicalLocation": "GL",
......
......@@ -7,7 +7,7 @@ from pathlib import Path
logging.basicConfig(filename='Test_import.log', level=logging.INFO, filemode='w')
short_profile_name = {
"DiagramLayout": 'DI',
"DiagramLayout": 'DL',
"Dynamics": "DY",
"Equipment": "EQ",
"GeographicalLocation": "GL",
......@@ -34,4 +34,4 @@ def test_import():
check_dict_pickle = pickle.load(open('CIGREMV_import_reference_cgmes_v2_4_15.p', 'rb'))
for elem in import_resolved:
check.is_in(elem, check_dict_pickle)
\ No newline at end of file
check.is_in(elem, check_dict_pickle)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment