Skip to main content

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.

Metadata

Release files for aceiot-cim-rdf 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aceiot-cim-rdf 0.1.0
File Size Uploaded Provenance Actions
aceiot_cim_rdf-0.1.0.tar.gz 68.7 kB With provenance Details for aceiot_cim_rdf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aceiot-cim-rdf 0.1.0
File Interpreter ABI Platform Actions
aceiot_cim_rdf-0.1.0-py3-none-any.whl Python 3 none any Details for aceiot_cim_rdf-0.1.0-py3-none-any.whl

Total release size: 136.1 kB

Release files / aceiot_cim_rdf-0.1.0.tar.gz

Download URL aceiot_cim_rdf-0.1.0.tar.gz
Size 68.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d5a8700401d6237d818b21bc9125dca94a0394558b933320590babf4755b171c
BLAKE2b-256 checksum
How to use checksums
78d7abce736b6cad49f0a24249ab673f54b4bbf4684f4802ff1e0ff0fd82dc13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 19, 2026.

Transparency log

Release files / aceiot_cim_rdf-0.1.0-py3-none-any.whl

Download URL aceiot_cim_rdf-0.1.0-py3-none-any.whl
Size 67.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60a0c1530cdb68be0fe89073b0fde25702412bc5ce174430cbe849ecfafef8b7
BLAKE2b-256 checksum
How to use checksums
362f76d209445a5a17d7439ee54caade9d8fe778f42cfb2a60dede86b5f0eada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 19, 2026.

Transparency log

Security for aceiot-cim-rdf 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aceiot_cim_rdf-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page