Releases: Haigutus/triplets
Releases · Haigutus/triplets
Release list
0.1.0rc5
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 crashedtype_tableviewwith'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_tripletsreturns nullable string dtype (empty cells stay null, not"nan"),set_value_at_keynormalizes;Noneno 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_undefinednow defaults to False — internal structures (Distribution,NamespaceMap) stay out of normal exports; withexport_undefined=Truethey emit under thehttp://triplets#namespace (valid, strict-parser-safe RDF/XML)- Optional
rdf:datatypeannotations 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 keepDeprecationWarningaliases until 0.2 - first-class autocomplete aliases:
get_types_count,tableview_by_type/key/id multivalue=Trueon all three tableview functions (shared pivot core)- cgmes_tools accepts polars / arrow / duckdb input
set_value_at_key(corrected from the rc4set_triplets_value_by_keymisnaming)
Housekeeping
- dropped
aniso8601core 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
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:stringstays plain (RDF 1.1 default),xsd:anyURIkeys keep IRI handling. Also fixesIdentifiedObject.mRIDbeing mis-exported as aurn:uuidreference. 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_type→filter_triplets_by_type,set_VALUE_at_KEY→set_triplets_value_by_key,diff_between_triplet→diff_triplets). Old names keep working withDeprecationWarninguntil 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
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.pyrewritten 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/.cppfiles that made CI builds dirty and broke the versioneer version (#39) skip-existing: trueon PyPI publish so partial publishes can be re-run (#42)
Full changelog: 0.1.0rc1...0.1.0rc3
0.1.0rc2
What's new since 0.1.0rc1
- Debug logging across all modules — replaces
print()in cython parser with properlogging.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.pyrewritten around method-name registries instead of hand-written delegation methods (#39) - Release fix — untrack generated
.pyc/.cppfiles 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
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
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
Minor fix
0.0.9
0.0.8
- Import and export speed optimizations and parallel processing initial support
- Arrow backed support for reduced memory footprint
Full Changelog: 0.0.7...0.0.8