CPDataKit v0.4.0
CPDataKit v0.4.0 - Schema contracts and report comparisons
CPDataKit 0.4.0 adds tools for reviewing schema changes and validation reports during data hand-offs
between simulation and analysis workflows.
Highlights
- Compare validated schema contracts with
diff_schemas()orcpdatakit schema diff. - Classify contract changes as identical, backward-compatible, or breaking.
- Compare two JSON validation reports with
compare_reports()orcpdatakit compare. - Write an offline comparison bundle with JSON, Markdown, HTML, and a hashed manifest.
- HDF5 format 1.0 and schema contract 1.0 remain compatible with existing files. The release also
adds canonical snapshot checks, ragged-shape findings, and empty-output protection.
Schema and compatibility changes
Optional-field additions, additive aliases, and description-only changes are backward-compatible.
Changes to units, shapes, component order, indexes, ranges, conventions, requiredness, profile, or
schema version are reported as breaking and require explicit review or mapping.
Validation and API changes
The new diff_schemas() and compare_reports() functions are exported from the package root. The
CLI writes deterministic JSON or Markdown. Existing output paths are preserved unless --force is
supplied. Comparison reports contain aggregate information and sanitized metadata.
Upgrade notes
The HDF5 format and schema contract remain at version 1.0, so existing files continue to use the
same format. New commands write reports and bundles from the supplied inputs. Schema and data
migration are separate steps.
Verification
On Windows with Python 3.12.13, the local release gate passed 230 tests with 87.47% coverage.
Ruff check and format checks passed. The two v0.4.0 distributions matched byte for byte, and both
release metadata and Twine checks passed. A clean wheel install ran the CLI, HDF5 API, quickstart,
and plotting smoke tests. The 100,000- and 1,000,000-record HDF5 diagnostics returned the expected
record counts. The release PR runs the Ubuntu/Windows Python 3.10-3.13 matrix and CodeQL checks.