cim-profiles 0.1.0a1__tar.gz

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.
Files changed (126) hide show
  1. cim_profiles-0.1.0a1/.gitignore +70 -0
  2. cim_profiles-0.1.0a1/CIMTool_plugin/LICENSE +29 -0
  3. cim_profiles-0.1.0a1/LICENSE +29 -0
  4. cim_profiles-0.1.0a1/PKG-INFO +153 -0
  5. cim_profiles-0.1.0a1/README.md +130 -0
  6. cim_profiles-0.1.0a1/pyproject.toml +57 -0
  7. cim_profiles-0.1.0a1/src/cimprofiles/README.md +293 -0
  8. cim_profiles-0.1.0a1/src/cimprofiles/__init__.py +38 -0
  9. cim_profiles-0.1.0a1/src/cimprofiles/build_merged_profiles.py +355 -0
  10. cim_profiles-0.1.0a1/src/cimprofiles/cim16/cim16v33/__init__.py +789 -0
  11. cim_profiles-0.1.0a1/src/cimprofiles/cim16/cim16v33/cim16v33.py +39397 -0
  12. cim_profiles-0.1.0a1/src/cimprofiles/cim16/cim16v33/cim16v33.rdfs-t2b.md +26221 -0
  13. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/__init__.py +559 -0
  14. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/cgmes_3_0_0.py +20135 -0
  15. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/core_equipment/__init__.py +250 -0
  16. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/core_equipment/core_equipment.py +12616 -0
  17. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/diagram/__init__.py +29 -0
  18. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/diagram/diagram_layout.py +816 -0
  19. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/dynamics/__init__.py +9 -0
  20. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/dynamics/dynamics.py +19 -0
  21. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/equipment_boundary/__init__.py +34 -0
  22. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/equipment_boundary/equipment_boundary.py +1089 -0
  23. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/geographical_location/__init__.py +22 -0
  24. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/geographical_location/geographical_location.py +825 -0
  25. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/operation/__init__.py +67 -0
  26. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/operation/operation.py +2448 -0
  27. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/short_circuit/__init__.py +65 -0
  28. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/short_circuit/short_circuit.py +3770 -0
  29. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/state_variables/__init__.py +42 -0
  30. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/state_variables/state_variables.py +2287 -0
  31. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/steady_state_hypothesis/__init__.py +111 -0
  32. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/steady_state_hypothesis/steady_state_hypothesis.py +4113 -0
  33. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/topology/__init__.py +32 -0
  34. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cgmes_3_0_0/topology/topology.py +713 -0
  35. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cim17v40/__init__.py +1719 -0
  36. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cim17v40/cim17v40.py +177480 -0
  37. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cimhub_2023/__init__.py +621 -0
  38. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cimhub_2023/cimhub_2023.py +28617 -0
  39. cim_profiles-0.1.0a1/src/cimprofiles/cim17/cimhub_2023/cimhub_2023.rdfs-t2b.md +18888 -0
  40. cim_profiles-0.1.0a1/src/cimprofiles/cim17/gridappsd_rc4_2021/__init__.py +831 -0
  41. cim_profiles-0.1.0a1/src/cimprofiles/cim17/gridappsd_rc4_2021/rc4_2021.py +49018 -0
  42. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gad/__init__.py +2054 -0
  43. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gad/cim18v15.py +198599 -0
  44. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/__init__.py +245 -0
  45. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/asset/Asset.rdfs-t2b.md +781 -0
  46. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/asset/__init__.py +41 -0
  47. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/asset/asset.py +1428 -0
  48. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/canonical/__init__.py +928 -0
  49. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/canonical/canonical.py +65314 -0
  50. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/cim18gmdm.py +7262 -0
  51. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/connectivity/UnbalancedConnectivity.rdfs-t2b.md +2541 -0
  52. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/connectivity/__init__.py +76 -0
  53. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/connectivity/connectivity.py +2792 -0
  54. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/diagram/__init__.py +26 -0
  55. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/diagram/diagram.py +759 -0
  56. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/electrical/UnbalancedElectrical.rdfs-t2b.md +3044 -0
  57. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/electrical/__init__.py +140 -0
  58. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/electrical/electrical.py +4108 -0
  59. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/location/GeographicalLocation.rdfs-t2b.md +969 -0
  60. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/location/__init__.py +69 -0
  61. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/location/location.py +1104 -0
  62. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/marketnode/__init__.py +15 -0
  63. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18gmdm/marketnode/marketnode.py +181 -0
  64. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/__init__.py +1383 -0
  65. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/asset/__init__.py +94 -0
  66. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/asset/asset.py +1314 -0
  67. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/asset_deployment/__init__.py +58 -0
  68. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/asset_deployment/asset_deployment.py +1057 -0
  69. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/asset_info/__init__.py +384 -0
  70. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/asset_info/asset_info.py +10322 -0
  71. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/cim18v17.py +44147 -0
  72. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/connectivity_unbalanced/__init__.py +208 -0
  73. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/connectivity_unbalanced/connectivity_unbalanced.py +5361 -0
  74. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/construction/__init__.py +130 -0
  75. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/construction/construction.py +3548 -0
  76. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/electrical_balanced/__init__.py +210 -0
  77. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/electrical_balanced/electrical_balanced.py +5225 -0
  78. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/electrical_unbalanced/__init__.py +190 -0
  79. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/electrical_unbalanced/electrical_unbalanced.py +5224 -0
  80. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/facts/__init__.py +80 -0
  81. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/facts/facts.py +2272 -0
  82. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/function_block_control/__init__.py +258 -0
  83. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/function_block_control/function_block_control.py +7179 -0
  84. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/hvdc/__init__.py +240 -0
  85. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/hvdc/hvdc.py +6346 -0
  86. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/load_area/__init__.py +94 -0
  87. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/load_area/load_area.py +1921 -0
  88. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/location/__init__.py +40 -0
  89. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/location/location.py +971 -0
  90. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/measurement/__init__.py +170 -0
  91. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/measurement/measurement.py +4787 -0
  92. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/operational_limit/__init__.py +70 -0
  93. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/operational_limit/operational_limit.py +1598 -0
  94. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/protection/__init__.py +174 -0
  95. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/protection/protection.py +2486 -0
  96. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/regulating_control/__init__.py +124 -0
  97. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/regulating_control/regulating_control.py +3497 -0
  98. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/short_circuit/__init__.py +102 -0
  99. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/short_circuit/short_circuit.py +2213 -0
  100. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/state_variable/__init__.py +68 -0
  101. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/state_variable/state_variable.py +1330 -0
  102. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/steady_state_hypothesis/__init__.py +110 -0
  103. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/steady_state_hypothesis/steady_state_hypothesis.py +1766 -0
  104. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/substation/__init__.py +80 -0
  105. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/substation/substation.py +1473 -0
  106. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/topology/__init__.py +42 -0
  107. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cim18v17/topology/topology.py +991 -0
  108. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cimhub_2026/__init__.py +550 -0
  109. cim_profiles-0.1.0a1/src/cimprofiles/cim18/cimhub_2026/cimhub_2026.py +33383 -0
  110. cim_profiles-0.1.0a1/src/cimprofiles/dedupe_profile_fields.py +150 -0
  111. cim_profiles-0.1.0a1/src/cimprofiles/env_vars.py +48 -0
  112. cim_profiles-0.1.0a1/src/cimprofiles/identity.py +444 -0
  113. cim_profiles-0.1.0a1/src/cimprofiles/merge.py +529 -0
  114. cim_profiles-0.1.0a1/src/cimprofiles/merge_releases.yaml +64 -0
  115. cim_profiles-0.1.0a1/src/cimprofiles/units/__init__.py +2 -0
  116. cim_profiles-0.1.0a1/src/cimprofiles/units/cim_units/__init__.py +2 -0
  117. cim_profiles-0.1.0a1/src/cimprofiles/units/cim_units/unit_multiplier.py +113 -0
  118. cim_profiles-0.1.0a1/src/cimprofiles/units/cim_units/unit_symbol.py +660 -0
  119. cim_profiles-0.1.0a1/src/cimprofiles/units/cim_units/units.txt +95 -0
  120. cim_profiles-0.1.0a1/src/cimprofiles/units/units.py +67 -0
  121. cim_profiles-0.1.0a1/tests/test_build_merged_profiles.py +156 -0
  122. cim_profiles-0.1.0a1/tests/test_cim_profile.py +31 -0
  123. cim_profiles-0.1.0a1/tests/test_identity_str.py +25 -0
  124. cim_profiles-0.1.0a1/tests/test_merge_profiles.py +347 -0
  125. cim_profiles-0.1.0a1/tests/test_profile_fields.py +32 -0
  126. cim_profiles-0.1.0a1/tests/test_uuid.py +368 -0
@@ -0,0 +1,70 @@
1
+ .vscode/*
2
+ .metadata/*
3
+ # Compiled class file
4
+ *.class
5
+ *.puml
6
+ */Profiles/*.py
7
+ # Log file
8
+ *.log
9
+
10
+ # BlueJ files
11
+ *.ctxt
12
+
13
+ # Mobile Tools for Java (J2ME)
14
+ .mtj.tmp/
15
+
16
+ # Package Files #
17
+ *.jar
18
+ *.war
19
+ *.nar
20
+ *.ear
21
+ *.zip
22
+ *.tar.gz
23
+ *.rar
24
+
25
+ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
26
+ hs_err_pid*
27
+ replay_pid*
28
+
29
+ # Python bytecode and extensions
30
+ __pycache__/
31
+ *.py[cod]
32
+ *$py.class
33
+ *.so
34
+
35
+ # Python packaging and build output
36
+ build/
37
+ dist/
38
+ *.egg-info/
39
+ *.egg
40
+ .eggs/
41
+ wheels/
42
+ sdist/
43
+
44
+ # Virtual environments
45
+ .venv/
46
+ venv/
47
+ env/
48
+ .python-version
49
+
50
+ # Test, coverage and type-checker caches
51
+ .pytest_cache/
52
+ .coverage
53
+ .coverage.*
54
+ htmlcov/
55
+ coverage.xml
56
+ .tox/
57
+ .nox/
58
+ .mypy_cache/
59
+ .ruff_cache/
60
+ .pyright/
61
+ .hypothesis/
62
+
63
+ # Jupyter
64
+ .ipynb_checkpoints/
65
+
66
+ # Documentation site build (mkdocs)
67
+ site/
68
+
69
+ # Local environment files
70
+ .env
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, Battelle Memorial Institute; All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software without
17
+ specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29
+ THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024, Battelle Memorial Institute; All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its contributors
16
+ may be used to endorse or promote products derived from this software without
17
+ specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29
+ THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,153 @@
1
+ Metadata-Version: 2.5
2
+ Name: cim-profiles
3
+ Version: 0.1.0a1
4
+ Summary: CIM data profiles (Python dataclasses) and the Identity/units object model used by CIMantic Graphs
5
+ Project-URL: Homepage, https://github.com/PNNL-CIM-Tools/CIM-Profiles
6
+ Project-URL: Repository, https://github.com/PNNL-CIM-Tools/CIM-Profiles
7
+ Project-URL: Issues, https://github.com/PNNL-CIM-Tools/CIM-Profiles/issues
8
+ Author-email: "A. Anderson" <19935503+AAndersn@users.noreply.github.com>, "C. Allwardt" <3979063+craig8@users.noreply.github.com>
9
+ License-Expression: BSD-3-Clause
10
+ License-File: LICENSE
11
+ Keywords: cgmes,cim,iec-61968,iec-61970,power-systems
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: <4.0,>=3.10
21
+ Requires-Dist: pint>=0.24.4
22
+ Description-Content-Type: text/markdown
23
+
24
+ # CIM-Profiles
25
+
26
+ ![GitHub Tag](https://img.shields.io/github/v/tag/PNNL-CIM-Tools/CIM-Profiles)
27
+ ![GitHub Release Date](https://img.shields.io/github/release-date-pre/PNNL-CIM-Tools/CIM-Profiles)
28
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/PNNL-CIM-Tools/CIM-Profiles/release.yml)
29
+ ![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/PNNL-CIM-Tools/CIM-Profiles)
30
+
31
+
32
+ ![PyPI - Version](https://img.shields.io/pypi/v/cim-profiles)
33
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/cim-profiles?label=pypi%20downloads)
34
+ ![PyPI - Format](https://img.shields.io/pypi/format/cim-profiles)
35
+
36
+
37
+ ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/PNNL-CIM-Tools/CIM-Profiles)
38
+ ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/PNNL-CIM-Tools/CIM-Profiles)
39
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/t/PNNL-CIM-Tools/CIM-Profiles)
40
+
41
+ ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/PNNL-CIM-Tools/CIM-Profiles/total?label=git%20downloads)
42
+ ![GitHub License](https://img.shields.io/github/license/PNNL-CIM-Tools/CIM-Profiles)
43
+
44
+ CIMTool workspaces for the CIM 16–18 profiles, and the `cimprofiles` Python package built from
45
+ them. These files originally shipped as part of cim-graph 0.1.x through 0.5.x.
46
+
47
+ `cimprofiles` ships the CIM profiles as Python dataclasses, together with the object model they
48
+ are built on (`Identity`, `CIMUnit`, profile merging). It depends only on `pint`, and it is
49
+ released separately from [cim-graph](https://github.com/PNNL-CIM-Tools/CIM-Graph). Profile updates
50
+ (new classes from EA tickets, new profiles) therefore don't wait for a cim-graph release.
51
+
52
+ ```bash
53
+ pip install cimprofiles
54
+ ```
55
+
56
+ ```python
57
+ import cimprofiles.cim18.cimhub_2026 as cim
58
+
59
+ line = cim.ACLineSegment(name='line_1')
60
+ ```
61
+
62
+ cim-graph 0.6 and later depend on `cimprofiles`. The old `cimgraph.data_profile.*` import paths
63
+ still work there, with a `DeprecationWarning`.
64
+
65
+ ## Repository layout
66
+
67
+ | Path | Contents |
68
+ |---|---|
69
+ | `cim17v40/`, `cim18v15/` | CIMTool workspaces. The Sparx EA `.eap` models are stored with Git LFS. |
70
+ | `CIMTool_plugin/` | The cimantic-graphs XSLT builders and their documentation |
71
+ | `src/cimprofiles/` | The Python package, with profiles grouped by CIM version (`cim16/`, `cim17/`, `cim18/`). See [`src/cimprofiles/README.md`](src/cimprofiles/README.md) for the available profiles and how merging works. |
72
+ | `scripts/import_cimtool_output.sh` | Copies a profile generated by CIMTool into `src/cimprofiles/` and rewrites its imports |
73
+ | `tests/` | Tests for `Identity`, UUIDs, merging and the generated profiles |
74
+
75
+ ## Seeded UUIDs
76
+
77
+ Deterministic identifiers are what downstream converters (ArcGIS, OpenDSS, ...) rely on to give
78
+ the same equipment the same RDF ID on every run. `Identity.identifier` is a UUID (CIM 18):
79
+ either the one given, or a deterministic construct. There are two cases.
80
+
81
+ **Read from a file:** the `rdf:ID`/`rdf:about` *is* the UUID, in any serialization
82
+ (`urn:uuid:…`, `#_…`, `_…`, any case). The name is not used. An identifier that is not a UUID is
83
+ replaced, with a warning, by the UUID seeded from it (below), so reading the same file again
84
+ gives the same UUIDs. The original string is kept as the mRID, unless the file has an mRID.
85
+ Readers key their graphs with `cimprofiles.identity.read_identifier`, which gives the same UUID.
86
+
87
+ **Built** (converters, notebooks, `.cimtbl`): a new object, deterministic only for the same model
88
+ authority, model and class, plus one of two keys. A UUID given as the mRID is used directly.
89
+
90
+ - **mRID route** - with a (non-UUID) mRID, the mRID is the key and the name is not used, so a
91
+ renamed object keeps its UUID. CIM 18 relaxes the mRID to a freeform string unique within the
92
+ model, so this is the route for models keyed by mRID.
93
+ - **Name route** - with no mRID, the name is the key, so a renamed object (bus 300 to bus 301) is
94
+ a different object and gets a different UUID.
95
+
96
+ The seeded UUID is version 5 (RFC 9562 §5.5):
97
+
98
+ ```python
99
+ namespace = uuid5(NAMESPACE_URL, model_authority)
100
+ uuid = uuid5(namespace, f'{model_name}+{ClassName}+{mRID}+{name}+{seed}')
101
+ ```
102
+
103
+ - `model_authority` is a URI (`CIMG_MODEL_AUTHORITY`, default
104
+ `https://github.com/PNNL-CIM-Tools/CIM-Graph`), as in `md:Model.modelingAuthoritySet`. The
105
+ namespace is also the identifier of the `cim:ModelAuthority` object cim-graph writes in file
106
+ headers, so each authority's UUIDs live in its own namespace.
107
+ - `model_name` comes from `CIMG_MODEL_NAME` (default empty).
108
+ - `mRID` is the object's mRID, or the non-UUID `rdf:ID`/`rdf:about` of an object read from a
109
+ file. It is normalized so every serialization of one object agrees: surrounding whitespace, a
110
+ `urn:uuid:` prefix, everything up to the last `#` and one leading `_` are removed.
111
+ `rdf:ID="_LINE1"`, `rdf:about="#_LINE1"` and `mRID="LINE1"` give the same UUID. Case is kept.
112
+ - `name` (whitespace-trimmed) is used only when there is no mRID, so one of the two is always
113
+ empty. `seed` (passed to `obj.uuid(seed=...)`) is optional.
114
+ - Every component keeps its position even when empty, and `%` and `+` inside a component are
115
+ escaped as `%25` and `%2B`, so two different inputs never produce the same string.
116
+ - No identifying input at all (or only empty/blank values) gives a random version 4 UUID.
117
+
118
+ `obj.uri()` returns the bare UUID: lowercase, or uppercase if it was read uppercase (CIMHub and
119
+ GridAPPS-D data), so writing a file back reproduces its identifiers. Underscores and
120
+ `urn:uuid:` prefixes belong to the serialization style and are added by cim-graph's writers
121
+ and queries (`CIMG_IEC61970_552`: `552-NEW`, `552-LEGACY` or `CGMES`).
122
+
123
+ `cimprofiles.identity.seeded_uuid` and `model_authority_namespace` implement the seeded UUID, and any
124
+ language with a UUID library can reproduce it from this description.
125
+
126
+ ## Updating a profile
127
+
128
+ 1. Regenerate it in CIMTool with the cimantic-graphs builders (`CIMTool_plugin/builder.md`).
129
+ 2. Import it. This rewrites the `cimgraph.data_profile` imports emitted by CIMTool before 2.3.1:
130
+ ```bash
131
+ scripts/import_cimtool_output.sh cim17 <Profiles/name.py> <Profiles/name.__init__.py>
132
+ ```
133
+ The first argument is the CIM version directory. A fourth argument names the package
134
+ directory when it differs from the envelope name (`gridappsd_rc4_2021` for `rc4_2021`),
135
+ or places a part of a merged profile (`cim18v17/substation`).
136
+ 3. Remove duplicate field definitions, and rebuild the pre-baked merged profiles (cim18gmdm,
137
+ cgmes_3_0_0, cim18v17) if it is one of their parts:
138
+ ```bash
139
+ uv run python -m cimprofiles.dedupe_profile_fields
140
+ uv run python -m cimprofiles.build_merged_profiles
141
+ ```
142
+ 4. Run the tests: `uv run pytest`.
143
+
144
+ ## Development
145
+
146
+ ```bash
147
+ uv sync
148
+ uv run pytest
149
+ ```
150
+
151
+ ## License
152
+
153
+ BSD 3-Clause. See [LICENSE](LICENSE).
@@ -0,0 +1,130 @@
1
+ # CIM-Profiles
2
+
3
+ ![GitHub Tag](https://img.shields.io/github/v/tag/PNNL-CIM-Tools/CIM-Profiles)
4
+ ![GitHub Release Date](https://img.shields.io/github/release-date-pre/PNNL-CIM-Tools/CIM-Profiles)
5
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/PNNL-CIM-Tools/CIM-Profiles/release.yml)
6
+ ![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/PNNL-CIM-Tools/CIM-Profiles)
7
+
8
+
9
+ ![PyPI - Version](https://img.shields.io/pypi/v/cim-profiles)
10
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/cim-profiles?label=pypi%20downloads)
11
+ ![PyPI - Format](https://img.shields.io/pypi/format/cim-profiles)
12
+
13
+
14
+ ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/PNNL-CIM-Tools/CIM-Profiles)
15
+ ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues-pr/PNNL-CIM-Tools/CIM-Profiles)
16
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/t/PNNL-CIM-Tools/CIM-Profiles)
17
+
18
+ ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/PNNL-CIM-Tools/CIM-Profiles/total?label=git%20downloads)
19
+ ![GitHub License](https://img.shields.io/github/license/PNNL-CIM-Tools/CIM-Profiles)
20
+
21
+ CIMTool workspaces for the CIM 16–18 profiles, and the `cimprofiles` Python package built from
22
+ them. These files originally shipped as part of cim-graph 0.1.x through 0.5.x.
23
+
24
+ `cimprofiles` ships the CIM profiles as Python dataclasses, together with the object model they
25
+ are built on (`Identity`, `CIMUnit`, profile merging). It depends only on `pint`, and it is
26
+ released separately from [cim-graph](https://github.com/PNNL-CIM-Tools/CIM-Graph). Profile updates
27
+ (new classes from EA tickets, new profiles) therefore don't wait for a cim-graph release.
28
+
29
+ ```bash
30
+ pip install cimprofiles
31
+ ```
32
+
33
+ ```python
34
+ import cimprofiles.cim18.cimhub_2026 as cim
35
+
36
+ line = cim.ACLineSegment(name='line_1')
37
+ ```
38
+
39
+ cim-graph 0.6 and later depend on `cimprofiles`. The old `cimgraph.data_profile.*` import paths
40
+ still work there, with a `DeprecationWarning`.
41
+
42
+ ## Repository layout
43
+
44
+ | Path | Contents |
45
+ |---|---|
46
+ | `cim17v40/`, `cim18v15/` | CIMTool workspaces. The Sparx EA `.eap` models are stored with Git LFS. |
47
+ | `CIMTool_plugin/` | The cimantic-graphs XSLT builders and their documentation |
48
+ | `src/cimprofiles/` | The Python package, with profiles grouped by CIM version (`cim16/`, `cim17/`, `cim18/`). See [`src/cimprofiles/README.md`](src/cimprofiles/README.md) for the available profiles and how merging works. |
49
+ | `scripts/import_cimtool_output.sh` | Copies a profile generated by CIMTool into `src/cimprofiles/` and rewrites its imports |
50
+ | `tests/` | Tests for `Identity`, UUIDs, merging and the generated profiles |
51
+
52
+ ## Seeded UUIDs
53
+
54
+ Deterministic identifiers are what downstream converters (ArcGIS, OpenDSS, ...) rely on to give
55
+ the same equipment the same RDF ID on every run. `Identity.identifier` is a UUID (CIM 18):
56
+ either the one given, or a deterministic construct. There are two cases.
57
+
58
+ **Read from a file:** the `rdf:ID`/`rdf:about` *is* the UUID, in any serialization
59
+ (`urn:uuid:…`, `#_…`, `_…`, any case). The name is not used. An identifier that is not a UUID is
60
+ replaced, with a warning, by the UUID seeded from it (below), so reading the same file again
61
+ gives the same UUIDs. The original string is kept as the mRID, unless the file has an mRID.
62
+ Readers key their graphs with `cimprofiles.identity.read_identifier`, which gives the same UUID.
63
+
64
+ **Built** (converters, notebooks, `.cimtbl`): a new object, deterministic only for the same model
65
+ authority, model and class, plus one of two keys. A UUID given as the mRID is used directly.
66
+
67
+ - **mRID route** - with a (non-UUID) mRID, the mRID is the key and the name is not used, so a
68
+ renamed object keeps its UUID. CIM 18 relaxes the mRID to a freeform string unique within the
69
+ model, so this is the route for models keyed by mRID.
70
+ - **Name route** - with no mRID, the name is the key, so a renamed object (bus 300 to bus 301) is
71
+ a different object and gets a different UUID.
72
+
73
+ The seeded UUID is version 5 (RFC 9562 §5.5):
74
+
75
+ ```python
76
+ namespace = uuid5(NAMESPACE_URL, model_authority)
77
+ uuid = uuid5(namespace, f'{model_name}+{ClassName}+{mRID}+{name}+{seed}')
78
+ ```
79
+
80
+ - `model_authority` is a URI (`CIMG_MODEL_AUTHORITY`, default
81
+ `https://github.com/PNNL-CIM-Tools/CIM-Graph`), as in `md:Model.modelingAuthoritySet`. The
82
+ namespace is also the identifier of the `cim:ModelAuthority` object cim-graph writes in file
83
+ headers, so each authority's UUIDs live in its own namespace.
84
+ - `model_name` comes from `CIMG_MODEL_NAME` (default empty).
85
+ - `mRID` is the object's mRID, or the non-UUID `rdf:ID`/`rdf:about` of an object read from a
86
+ file. It is normalized so every serialization of one object agrees: surrounding whitespace, a
87
+ `urn:uuid:` prefix, everything up to the last `#` and one leading `_` are removed.
88
+ `rdf:ID="_LINE1"`, `rdf:about="#_LINE1"` and `mRID="LINE1"` give the same UUID. Case is kept.
89
+ - `name` (whitespace-trimmed) is used only when there is no mRID, so one of the two is always
90
+ empty. `seed` (passed to `obj.uuid(seed=...)`) is optional.
91
+ - Every component keeps its position even when empty, and `%` and `+` inside a component are
92
+ escaped as `%25` and `%2B`, so two different inputs never produce the same string.
93
+ - No identifying input at all (or only empty/blank values) gives a random version 4 UUID.
94
+
95
+ `obj.uri()` returns the bare UUID: lowercase, or uppercase if it was read uppercase (CIMHub and
96
+ GridAPPS-D data), so writing a file back reproduces its identifiers. Underscores and
97
+ `urn:uuid:` prefixes belong to the serialization style and are added by cim-graph's writers
98
+ and queries (`CIMG_IEC61970_552`: `552-NEW`, `552-LEGACY` or `CGMES`).
99
+
100
+ `cimprofiles.identity.seeded_uuid` and `model_authority_namespace` implement the seeded UUID, and any
101
+ language with a UUID library can reproduce it from this description.
102
+
103
+ ## Updating a profile
104
+
105
+ 1. Regenerate it in CIMTool with the cimantic-graphs builders (`CIMTool_plugin/builder.md`).
106
+ 2. Import it. This rewrites the `cimgraph.data_profile` imports emitted by CIMTool before 2.3.1:
107
+ ```bash
108
+ scripts/import_cimtool_output.sh cim17 <Profiles/name.py> <Profiles/name.__init__.py>
109
+ ```
110
+ The first argument is the CIM version directory. A fourth argument names the package
111
+ directory when it differs from the envelope name (`gridappsd_rc4_2021` for `rc4_2021`),
112
+ or places a part of a merged profile (`cim18v17/substation`).
113
+ 3. Remove duplicate field definitions, and rebuild the pre-baked merged profiles (cim18gmdm,
114
+ cgmes_3_0_0, cim18v17) if it is one of their parts:
115
+ ```bash
116
+ uv run python -m cimprofiles.dedupe_profile_fields
117
+ uv run python -m cimprofiles.build_merged_profiles
118
+ ```
119
+ 4. Run the tests: `uv run pytest`.
120
+
121
+ ## Development
122
+
123
+ ```bash
124
+ uv sync
125
+ uv run pytest
126
+ ```
127
+
128
+ ## License
129
+
130
+ BSD 3-Clause. See [LICENSE](LICENSE).
@@ -0,0 +1,57 @@
1
+ [project]
2
+ name = "cim-profiles"
3
+ version = "0.1.0a1"
4
+ description = "CIM data profiles (Python dataclasses) and the Identity/units object model used by CIMantic Graphs"
5
+ authors = [
6
+ {name = "A. Anderson", email = "19935503+AAndersn@users.noreply.github.com"},
7
+ {name = "C. Allwardt", email = "3979063+craig8@users.noreply.github.com"}
8
+ ]
9
+ readme = "README.md"
10
+ requires-python = ">=3.10,<4.0"
11
+ license = "BSD-3-Clause"
12
+ license-files = ["LICENSE"]
13
+ keywords = ["cim", "power-systems", "iec-61970", "iec-61968", "cgmes"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: Science/Research",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ ]
24
+
25
+ dependencies = [
26
+ "pint>=0.24.4",
27
+ ]
28
+
29
+ [dependency-groups]
30
+ dev = [
31
+ "pytest>=8.3.5",
32
+ # build_merged_profiles reads merge_releases.yaml
33
+ "pyyaml>=6.0",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/PNNL-CIM-Tools/CIM-Profiles"
38
+ Repository = "https://github.com/PNNL-CIM-Tools/CIM-Profiles"
39
+ Issues = "https://github.com/PNNL-CIM-Tools/CIM-Profiles/issues"
40
+
41
+ [build-system]
42
+ requires = ["hatchling>=1.27"]
43
+ build-backend = "hatchling.build"
44
+
45
+ [tool.hatch.build.targets.wheel]
46
+ packages = ["src/cimprofiles"]
47
+
48
+ [tool.hatch.build.targets.sdist]
49
+ include = [
50
+ "/src/cimprofiles",
51
+ "/tests",
52
+ "README.md",
53
+ "LICENSE",
54
+ ]
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = ["tests"]