Skip to main content

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, AllInstalled pooling

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)

Metadata

Release files for imf-to-cdf 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 imf-to-cdf 0.1.0
File Size Uploaded Provenance Actions
imf_to_cdf-0.1.0.tar.gz 130.8 kB Without provenance Details for imf_to_cdf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imf-to-cdf 0.1.0
File Interpreter ABI Platform Actions
imf_to_cdf-0.1.0-py3-none-any.whl Python 3 none any Details for imf_to_cdf-0.1.0-py3-none-any.whl

Total release size: 155.0 kB

Release files / imf_to_cdf-0.1.0.tar.gz

Download URL imf_to_cdf-0.1.0.tar.gz
Size 130.8 kB
Tags Source
SHA-256 checksum
How to use checksums
03262fd3bc4b1becb6c0411b759e8447e9cefcfe05ecd1169271d05ab5e51301
BLAKE2b-256 checksum
How to use checksums
f2c7dcb28efd483b709aa69bdff8cc66aa92a5cfde36534cead0ac217e1f6bba
Upload date
Uploaded using Trusted Publishing?
What is 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}

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

Download URL imf_to_cdf-0.1.0-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
599a8dba2329c187c9a4eb8c8806c58eadd82091265d4719d2b6f9b9e337d3bc
BLAKE2b-256 checksum
How to use checksums
50a1eef0d124a1d833cd622c275fe4869e85d2fbe44b3190625b8fcfd18b38e8
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for imf-to-cdf 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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 No 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