Skip to content

Commit

Permalink
check output when changing to CGMES 3 version
Browse files Browse the repository at this point in the history
Signed-off-by: Iris Koester <[email protected]>
  • Loading branch information
iripiri committed Aug 10, 2023
1 parent 52209b0 commit acfaf58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion cimpy/cgmes_v3_0_0/Base.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
from enum import Enum

short_profile_name = {
"DiagramLayout": 'DL',
"Dynamics": "DY",
"Equipment": "EQ",
"GeographicalLocation": "GL",
"StateVariables": "SV",
"SteadyStateHypothesis": "SSH",
"Topology": "TP"
}


class Base():
"""
Base Class for CIM
"""

cgmesProfile = Enum("cgmesProfile", {"EQ": 0, "SSH": 1, "TP": 2, "SV": 3, "DY": 4, "GL": 5, "DL": 6, "TP_BD": 7, "EQ_BD": 8})
cgmesProfile = Enum("cgmesProfile", {"EQ": 0, "SSH": 1, "TP": 2, "SV": 3, "DY": 4, "GL": 5, "DL": 6, "TP_BD": 7, "EQ_BD": 8, "OP": 9, "SC": 10, "EQBD": 11})

def __init__(self, *args, **kw_args):
pass
Expand Down
6 changes: 3 additions & 3 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import cimpy
from cimpy.cgmes_v2_4_15.Base import short_profile_name
from cimpy.cgmes_v3_0_0.Base import short_profile_name
import os
import glob
import pytest_check as check
Expand All @@ -23,10 +23,10 @@ def test_import():
for file in example_dir.glob('*.xml'):
test_files.append(str(file.absolute()))

imported_result = cimpy.cim_import(test_files, 'cgmes_v2_4_15')
imported_result = cimpy.cim_import(test_files, 'cgmes_v3_0_0')

import_resolved = cimpy.cimexport._get_class_attributes_with_references(
imported_result, 'cgmes_v2_4_15')
imported_result, 'cgmes_v3_0_0')

ref_dict_path = Path(os.path.join(os.path.dirname(
__file__), 'CIGREMV_import_reference_cgmes_v2_4_15.p'))
Expand Down

0 comments on commit acfaf58

Please sign in to comment.