A tool to convert power system models from IEEE RAW format to CIM RDF (Turtle).
Project description
aceiot-cim-rdf
aceiot-cim-rdf converts power-system network models from PSS/E-style IEEE RAW files into CIM RDF serialized as Turtle. It also includes schema-derived Pydantic models for CGMES/CIM classes and helpers for RDF serialization, deserialization, and model regeneration from external RDFS profile files.
The project is currently focused on practical RAW-to-CIM conversion for common steady-state network elements and ships with an IEEE 14-bus sample model for validation.
Features
- Parse PSS/E v33-style RAW files.
- Convert buses, loads, generators, AC branches, two-winding transformers, fixed shunts, terminals, voltage levels, substations, topology nodes, and base voltages into CIM objects.
- Serialize generated CIM objects to RDF/Turtle with
rdflib. - Include Dublin Core Terms provenance in Turtle output for the bundled IEEE 14-bus sample data.
- Deserialize Turtle back into registered Pydantic CIM model objects.
- Generate Pydantic CIM model classes from ENTSO-E CGMES 2.4.15 RDFS profile definitions supplied locally.
- Validate conversion behavior with pytest, including IEEE 14-bus regression tests and RDF round-trip isomorphism checks.
Project Status
This is an early-stage converter. It is suitable for experimentation, testing workflows, and extending RAW-to-CIM mapping logic, but it should be reviewed before use in production interchange pipelines.
Current limitations include:
- RAW parsing targets the sections and field positions covered by the current tests.
- Conversion mappings are intentionally small and do not yet cover every PSS/E record type or every CGMES profile requirement.
- RDF output is useful for graph workflows, but full CGMES conformance validation is not yet implemented.
Installation
This project uses Python 3.13 or newer.
Install the published package from PyPI:
python -m pip install aceiot-cim-rdf
Or with uv:
uv add aceiot-cim-rdf
After installation, the ieee-to-cim command is available on your PATH.
For local development, clone the repository and install dependencies with uv:
With uv:
uv sync
Or with pip:
python -m pip install .
For development dependencies:
uv sync --group dev
Usage
CLI
Convert a RAW file to Turtle:
uv run ieee-to-cim "IEEE 14-Bus System/IEEE 14 bus.raw" ieee14_cim.ttl
Run the same conversion with a deserialize/serialize round-trip object-count check:
uv run ieee-to-cim "IEEE 14-Bus System/IEEE 14 bus.raw" ieee14_cim.ttl --validate
After installing the package, the console script is available directly:
ieee-to-cim model.raw model.ttl --validate
Python API
from aceiot_cim_rdf import parse_raw, convert_to_cim, serialize_to_turtle
raw_data = parse_raw("model.raw")
cim_objects = convert_to_cim(raw_data)
turtle = serialize_to_turtle(cim_objects)
with open("model.ttl", "w") as f:
f.write(turtle)
Deserialize Turtle back into registered CIM model objects:
from aceiot_cim_rdf import deserialize_from_turtle
objects = deserialize_from_turtle(turtle)
Development
Run the test suite:
uv run pytest
Run linting:
uv run ruff check .
Build the package:
uv build
The wheel excludes large reference and sample-data directories configured in pyproject.toml.
Repository Layout
src/aceiot_cim_rdf/
cli.py Command-line interface.
conversion.py RAW parser and RAW-to-CIM conversion logic.
parser.py RDFS parser and Pydantic model generator.
cim_pydantic/
base.py CIM base model, registry, and RDF helpers.
models/ Generated CIM/CGMES Pydantic models.
tests/ Parser, converter, and RDF round-trip tests.
IEEE 14-Bus System/ Sample IEEE 14-bus RAW/EPC/PWB/PWD files.
Regenerating CIM Models
The generated model set lives under src/aceiot_cim_rdf/cim_pydantic/models/. The schema parser can regenerate profile modules from a local directory containing ENTSO-E CGMES RDFS files:
from aceiot_cim_rdf.parser import SchemaParser
parser = SchemaParser("/path/to/ENTSOE_CGMES_v2.4.15_16Feb2016_RDFS")
parser.parse()
parser.generate("src/aceiot_cim_rdf/cim_pydantic")
The generator writes concrete classes into profile-specific modules and keeps models/all.py as a compatibility aggregate for older imports.
Dataset Credits
When converting the bundled IEEE 14-bus RAW file, the CLI adds RDF provenance metadata referencing the Texas A&M Electric Grid Test Case Repository and the University of Washington Power Systems Test Case Archive. Texas A&M describes the IEEE 14-bus system as a simple approximation of the American Electric Power system as of February 1962 and encourages users to cite the appropriate sources when using the dataset.
License
MIT. See the project metadata in pyproject.toml.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aceiot_cim_rdf-0.1.0.tar.gz.
File metadata
- Download URL: aceiot_cim_rdf-0.1.0.tar.gz
- Upload date:
- Size: 68.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5a8700401d6237d818b21bc9125dca94a0394558b933320590babf4755b171c
|
|
| MD5 |
4541dfa3038089f416c9348460b12751
|
|
| BLAKE2b-256 |
78d7abce736b6cad49f0a24249ab673f54b4bbf4684f4802ff1e0ff0fd82dc13
|
Provenance
The following attestation bundles were made for aceiot_cim_rdf-0.1.0.tar.gz:
Publisher:
pypi.yaml on ACE-IoT-Solutions/aceiot-cim-rdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aceiot_cim_rdf-0.1.0.tar.gz -
Subject digest:
d5a8700401d6237d818b21bc9125dca94a0394558b933320590babf4755b171c - Sigstore transparency entry: 1573957666
- Sigstore integration time:
-
Permalink:
ACE-IoT-Solutions/aceiot-cim-rdf@364c2c627050a077255e5591b5212402919c17b9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ACE-IoT-Solutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@364c2c627050a077255e5591b5212402919c17b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aceiot_cim_rdf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aceiot_cim_rdf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 67.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60a0c1530cdb68be0fe89073b0fde25702412bc5ce174430cbe849ecfafef8b7
|
|
| MD5 |
ab25194d1cb1ea7993b4d50a1ec4750b
|
|
| BLAKE2b-256 |
362f76d209445a5a17d7439ee54caade9d8fe778f42cfb2a60dede86b5f0eada
|
Provenance
The following attestation bundles were made for aceiot_cim_rdf-0.1.0-py3-none-any.whl:
Publisher:
pypi.yaml on ACE-IoT-Solutions/aceiot-cim-rdf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aceiot_cim_rdf-0.1.0-py3-none-any.whl -
Subject digest:
60a0c1530cdb68be0fe89073b0fde25702412bc5ce174430cbe849ecfafef8b7 - Sigstore transparency entry: 1573957709
- Sigstore integration time:
-
Permalink:
ACE-IoT-Solutions/aceiot-cim-rdf@364c2c627050a077255e5591b5212402919c17b9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ACE-IoT-Solutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@364c2c627050a077255e5591b5212402919c17b9 -
Trigger Event:
push
-
Statement type: