Skip to content

Releases: Haigutus/triplets

0.1.0rc5

0.1.0rc5 Pre-release
Pre-release

Choose a tag to compare

@Haigutus Haigutus released this 13 Jun 02:04
9147bfe

What's new since 0.1.0rc4

Fixes (unblock rc4 users)

  • pandas 2.2.x excluded (pandas>=2.0,!=2.2.*) — pivot() on ArrowDtype dictionary columns crashed type_tableview with 'Series' object has no attribute '_pa_array'; fixed upstream in pandas 2.3 (#52)
  • Export tolerates non-string VALUEs — numbers from edited tableviews no longer crash the compiled CIM XML export (Expected bytes, got a 'int' object); export functions also fail early with a clear message when triplet columns are missing (#50)
  • Triplets string-or-null invariant enforced at producers — tableview_to_triplets returns nullable string dtype (empty cells stay null, not "nan"), set_value_at_key normalizes; None no longer becomes the literal "None" (#55)

Export

  • Schema-driven profile resolution — the schema's own ProfileMetadata (keyword / versionIRI / conformsTo) is matched against the instance header, so CGMES 2.4.15, CGMES 3.0 and NetworkCode dcat headers all resolve correctly
  • export_undefined now defaults to False — internal structures (Distribution, NamespaceMap) stay out of normal exports; with export_undefined=True they emit under the http://triplets# namespace (valid, strict-parser-safe RDF/XML)
  • Optional rdf:datatype annotations in CIM XML export (datatypes=True, python_lxml engine)
  • N-Quads literal datatypes from the export schema ("44.84"^^<xsd:float>)
  • N-Quads polars engine — single lazy expression plan, ~2x faster than the previous polars path; engine="auto" routes to it

API & naming

  • tools functions follow <action>_<format>_<qualifier> (e.g. filter_triplets_by_type, diff_triplets); 0.0 names keep DeprecationWarning aliases until 0.2
  • first-class autocomplete aliases: get_types_count, tableview_by_type/key/id
  • multivalue=True on all three tableview functions (shared pivot core)
  • cgmes_tools accepts polars / arrow / duckdb input
  • set_value_at_key (corrected from the rc4 set_triplets_value_by_key misnaming)

Housekeeping

  • dropped aniso8601 core dependency (pandas parses CGMES timestamps) (#30)
  • artifact actions bumped to Node 24 majors (#40)
  • N-Quads vs CIM XML rdflib-load benchmarks (group rdflib-load)

Full changelog: 0.1.0rc4...0.1.0rc5

0.1.0rc4

0.1.0rc4 Pre-release
Pre-release

Choose a tag to compare

@Haigutus Haigutus released this 11 Jun 12:49
b1185b7

What's new since 0.1.0rc3

Performance

  • CIM XML export engine dispatch (#43, closes #32) — export_to_cimxml(engine="auto") uses the compiled Arrow→pugixml extension when available: 11.5x faster on RealGrid (1.14M rows: 9.3s → 0.8s). Both engines produce data-identical output (verified by equivalence tests).

N-Quads

  • Schema datatype annotations (#46, closes #31) — literals carry their xsd type from the export schema ("44.84"^^<...XMLSchema#float>); xsd:string stays plain (RDF 1.1 default), xsd:anyURI keys keep IRI handling. Also fixes IdentifiedObject.mRID being mis-exported as a urn:uuid reference. Validated end-to-end with rdflib, including referential integrity against known dangling references.

API

  • tools renames (#45) — 13 functions renamed to the <action>_<format>_<qualifier> convention (e.g. filter_by_typefilter_triplets_by_type, set_VALUE_at_KEYset_triplets_value_by_key, diff_between_tripletdiff_triplets). Old names keep working with DeprecationWarning until 0.2 — see the migration guide.
  • IDE-autocomplete aliases (#45) — first-class aliases get_types_count, tableview_by_type/key/id (no deprecation, both names permanent).
  • cgmes_tools renames (#44) — draw_relations_graph (typo fix), count_GeneratingUnit_types, generate_instance_ids, get_model_triplets; old names deprecated.

Interop

  • cgmes_tools accepts polars, arrow, and DuckDB input (#44) — converted automatically at the package boundary (~10 ms / 1.14M rows); DataFrame results come back in the input flavor.

Docs

  • New Export Architecture guide mirroring the parser guide; parser guide updated with engine aliases and logging-level debug output.

Full changelog: 0.1.0rc3...0.1.0rc4

0.1.0rc3

0.1.0rc3 Pre-release
Pre-release

Choose a tag to compare

@Haigutus Haigutus released this 10 Jun 10:21
18f3925

Note: 0.1.0rc2 on PyPI is incomplete (wheels only, no sdist) — its first publish run uploaded wheels built from a dirty checkout before the sdist was rejected, and PyPI filenames cannot be reused. Use 0.1.0rc3 instead.

What's new since 0.1.0rc1

Visualization

  • Relations graphs rewritten without pyvis (#41) — self-contained HTML with vendored vis-network 9.1.13, works offline. Full-viewport graph; selecting a node opens a copyable object data table panel (deduplicated rows, source filename instead of instance UUID). draw_relations* open the browser automatically (open_browser=True).

Features & refactors

  • Schema-aware N-Quads export — enums get namespace, UUIDs get urn:uuid (#38)
  • DuckDB engine split into proper modules matching pandas/polars pattern
  • Registry-driven accessors_accessor.py rewritten around method-name registries (#39)
  • Debug logging across all modules; parser auto-enables debug output when the logger is at DEBUG level

Release pipeline

  • Untracked generated .pyc/.cpp files that made CI builds dirty and broke the versioneer version (#39)
  • skip-existing: true on PyPI publish so partial publishes can be re-run (#42)

Full changelog: 0.1.0rc1...0.1.0rc3

0.1.0rc2

0.1.0rc2 Pre-release
Pre-release

Choose a tag to compare

@Haigutus Haigutus released this 10 Jun 08:52
6c5ba11

What's new since 0.1.0rc1

  • Debug logging across all modules — replaces print() in cython parser with proper logging.getLogger(), adds debug logging for engine selection, accessor registration, and export dispatch
  • Schema-aware N-Quads export — enums get namespace, UUIDs get urn:uuid (#38)
  • DuckDB engine split into proper modules matching pandas/polars pattern
  • Registry-driven accessors_accessor.py rewritten around method-name registries instead of hand-written delegation methods (#39)
  • Release fix — untrack generated .pyc/.cpp files that made CI builds dirty and broke the versioneer version (#39)
  • Docs — suppress duplicate warnings, fix docstrings, cleanup orphan files
  • CI — use absolute paths in test_parser.py for cibuildwheel compatibility

Full changelog: 0.1.0rc1...0.1.0rc2

0.1.0rc1

0.1.0rc1 Pre-release
Pre-release

Choose a tag to compare

@Haigutus Haigutus released this 08 Jun 18:52

Release Candidate: Three-tier CIMXML parser with engine= API

Install

# Core (python_lxml_pandas engine, no extra deps)
pip install --pre triplets

# With pyarrow (enables python_lxml_arrow + cython_pugixml_arrow engines, ~12x faster)
pip install --pre triplets[arrow]

The cython_pugixml_arrow engine is a compiled C++ extension included in the wheels.
It requires pyarrow at runtime — install with triplets[arrow] to enable it.

What's new

  • Three parser engines with automatic fallback (python_lxml_pandas, python_lxml_arrow, cython_pugixml_arrow)
  • engine= parameter on parse() and pandas.read_RDF()
  • polars.read_rdf() registered alongside pandas.read_RDF()
  • pyarrow moved to optional dep (pip install triplets[arrow])
  • Dictionary-encoded KEY + INSTANCE_ID columns — categories are free (no overhead)
  • Cross-platform wheels with compiled cython extension (Linux x86+ARM, macOS ARM, Windows)

Performance (RealGrid ~82MB, 1.14M rows)

Engine Install Speed Memory
python_lxml_pandas pip install triplets 1,599 ms 314 MB
python_lxml_arrow pip install triplets[arrow] 1,477 ms 145 MB
cython_pugixml_arrow pip install triplets[arrow] 129 ms 50 MB

Backwards compatible

  • pandas.read_RDF() works unchanged
  • df.type_tableview() works unchanged
  • Old rdf_parser.py functions emit deprecation warnings

0.0.17

Choose a tag to compare

@Haigutus Haigutus released this 13 Nov 01:05
7677b95

What's Changed

  • Updated export schema and simplified cim/xml export by @Haigutus in #17
  • Missing package imports by @Haigutus in #18
  • Fixed imports by @Haigutus in #19
  • Imports and documentation fix by @Haigutus in #20
  • Still import issues, making all init imports relative by @Haigutus in #21
  • Still import issues, changed import order, added addtional resources … by @Haigutus in #22

Full Changelog: 0.0.11...0.0.17

0.0.11

Choose a tag to compare

@Haigutus Haigutus released this 10 Jul 07:25
6849942

What's Changed

  • escapes print_duration not founding the start time if not debug mode by @mr0321 in #10

New Contributors

Full Changelog: 0.0.10...0.0.11

Minor fix

Choose a tag to compare

@Haigutus Haigutus released this 19 May 08:46

Full Changelog: 0.0.9...0.0.10

0.0.9

Choose a tag to compare

@Haigutus Haigutus released this 19 May 08:32
2e9329c

What's Changed

Full Changelog: 0.0.8...0.0.9

0.0.8

Choose a tag to compare

@Haigutus Haigutus released this 10 Nov 23:57
  1. Import and export speed optimizations and parallel processing initial support
  2. Arrow backed support for reduced memory footprint

Full Changelog: 0.0.7...0.0.8