imf-to-neat — NEAT plugin for IMF ontologies
Converts one or more PCA IMF Turtle (.ttl) ontology files into a NEAT physical data model (views, containers, properties with value types).
Features
- Aspect-aware view naming (
Plant,Product,Installed,Function,Location) - Value-type resolution from CFIHOS, RDS (PCA SPARQL), IEC CDD and label heuristics
- Deprecated-term cleaning (
dcterms:replaces) - Container optimization: CFIHOS hierarchy grouping, identical-fingerprint merging, subset detection,
AllInstalledpooling
Installation
# From the plugin directory
pip install -e .
# or with uv
uv pip install -e .
The plugin and cognite-neat must be in the same Python environment.
Usage — NEAT plugin API
from cognite.neat import NeatSession
neat = NeatSession() # or NeatSession(client) with a CDF client
# Single file
neat.plugin.data_model.read(
"imf",
io="imf_ontology.ttl",
clean=True,
optimize_containers=True,
space="my_imf_space",
external_id="MyIMFDataModel",
version="v1",
)
# Multiple files merged into one model
neat.plugin.data_model.read(
"imf",
io=["types_a.ttl", "types_b.ttl"],
cfihos_csv="CFIHOS CORE property v2.0.csv",
)
All keyword arguments
| Argument | Type | Default | Description |
|---|---|---|---|
io |
str | Path | list |
— | Required. TTL file(s) |
clean |
bool |
True |
Remove deprecated terms |
cfihos_csv |
Path |
None |
Local CFIHOS property CSV |
cfihos_url |
str |
CFIHOS ZIP URL | Online CFIHOS data source |
cfihos_cache |
Path |
None |
JSON cache for online CFIHOS data |
rds_cache |
Path |
None |
JSON cache for RDS numeric codes |
cdd_lookup |
Path |
None |
Enriched IEC CDD CSV with Value type column |
optimize_containers |
bool |
False |
Enable container optimization |
space |
str |
"imf_space" |
CDF space |
external_id |
str |
"IMFDataModel" |
Model externalId |
version |
str |
"v1" |
Model version |
name |
str |
None |
Human-readable name |
description |
str |
None |
Model description |
creator |
str |
"NEAT" |
Creator |
Usage — standalone CLI
After installation the imf-to-neat command is available:
imf-to-neat imf_ontology.ttl --clean --optimize-containers
imf-to-neat a.ttl b.ttl -o merged_model.yaml
imf-to-neat ontology.ttl --cfihos-csv "CFIHOS CORE property v2.0.csv" --rds-sparql
Plugin structure
imf-to-neat-plugin/
├── pyproject.toml
├── README.md
└── imf_to_neat/
├── __init__.py
├── plugin.py # IMFToNeatPlugin (DataModelImporterPlugin)
├── _importer.py # IMFToNeatImporter (BaseImporter)
├── _core.py # All processing logic
└── cli.py # CLI entry point (imf-to-neat command)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imf_to_cdf-0.1.0.tar.gz
(130.8 kB
view details)
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 imf_to_cdf-0.1.0.tar.gz.
File metadata
- Download URL: imf_to_cdf-0.1.0.tar.gz
- Upload date:
- Size: 130.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03262fd3bc4b1becb6c0411b759e8447e9cefcfe05ecd1169271d05ab5e51301
|
|
| MD5 |
87bd613b7f04a01e608dce00ce3329d4
|
|
| BLAKE2b-256 |
f2c7dcb28efd483b709aa69bdff8cc66aa92a5cfde36534cead0ac217e1f6bba
|
File details
Details for the file imf_to_cdf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: imf_to_cdf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
599a8dba2329c187c9a4eb8c8806c58eadd82091265d4719d2b6f9b9e337d3bc
|
|
| MD5 |
412f7312efbce745505da11da048139f
|
|
| BLAKE2b-256 |
50a1eef0d124a1d833cd622c275fe4869e85d2fbe44b3190625b8fcfd18b38e8
|