Releases: nigiva/cobjectric
Releases · nigiva/cobjectric
v3.0.0
Add Pandas integration and unify result APIs
Added
- Add pandas export helpers (
to_series(),to_dataframe()) behind an optionalpandasextra (cobjectric[pandas]). - Add new result types/collections to support unified metric results and aggregation across models/lists.
Fixed
- Validate metric function outputs more strictly by raising dedicated errors when similarity/fill-rate-accuracy values are invalid or out of range.
Updated
- Move built-in similarity functions/decorators to
cobjectric.similarity(replacecobjectric.similarities) and update public exports accordingly. - Refactor list comparison typing to use the unified
ModelResultAPI instead of fill-rate-specific result types.
Removed
- Remove reliance on fill-rate-specific result classes as the primary public result API in favor of unified metric result classes.
Full Changelog: v2.1.1...v3.0.0
v2.1.1
Mark library as production-ready and enhance documentation
Updated
- Update development status classifier from "Alpha" to "Production/Stable" in package metadata
- Enhance documentation section in README with comprehensive overview of available resources
- Improve formatting and clarity in specifications documentation
- Add documentation badge to README for better visibility
Full Changelog: v2.1.0...v2.1.1
v2.1.0
Pre-defined Specs and Contextual Normalizers
Added
- Add pre-defined Specs for common field types:
KeywordSpecfor identifiers, codes, and enums with exact matching, optional whitespace stripping, and int-to-string conversionTextSpecfor free-form text with fuzzy matching and comprehensive normalization (lowercase, strip, collapse spaces, remove accents)NumericSpecfor numeric fields with intelligent type coercion (JSON Number → Python int/float) and optional tolerance-based similarityBooleanSpecfor boolean fields with exact matching and value conversionDatetimeSpecfor datetime strings with ISO format normalization, auto-detection of common formats, and time difference tolerance for similarity
- Add contextual normalizers that receive
FieldContext(field name, type, and spec) for type-aware normalization - Add
FieldContextdataclass to pass context information to normalizers - Add
datetime_similarity_factory()for datetime comparison with optional time difference tolerance - Add automatic detection of normalizer signature (simple 1-param vs contextual 2-param) in
BaseModel
Updated
- Update
FieldSpecto support both simple and contextual normalizers - Update
BaseModel._build_combined_normalizer()to handle contextual normalizers and passFieldContextwhen needed - Update field processing to preserve all
FieldSpecattributes when creating combined normalizers
Full Changelog: v2.0.0...v2.1.0
v2.0.0
Similarity, List Comparison Strategies, Path Access, and Enhanced Metrics
Added
- Add similarity computation to compare field values between models with fuzzy text matching support
- Add fill rate accuracy computation to compare data completeness between two models
- Add path access notation to access nested fields using dot notation (e.g.,
result["address.city"]orresult["items[0].name"]) - Add list comparison strategies for comparing list fields with three alignment algorithms:
- Pairwise comparison by index (default)
- Levenshtein-based alignment for order-preserving matching
- Optimal assignment using Hungarian algorithm for best one-to-one matching (requires scipy)
- Add built-in similarity functions:
- Exact similarity for strict equality matching
- Fuzzy similarity factory with multiple rapidfuzz scorers (ratio, partial_ratio, token_sort_ratio, token_set_ratio, WRatio, QRatio)
- Numeric similarity factory with configurable difference thresholds
- Add statistical aggregation methods (mean, std, var, min, max, quantile) on all result objects
- Add support for custom similarity functions per field via
Spec(similarity_func=...)or@similarity_funcdecorator - Add support for custom fill rate accuracy functions per field via
Spec(fill_rate_accuracy_func=...)or@fill_rate_accuracy_funcdecorator - Add aggregated field access for list results to compute statistics across list items via
items.aggregated_fields - Add improved model representation with
__repr__showing field values and missing fields - Add scipy dependency for optimal assignment list comparison strategy
Updated
- Update fill rate computation to support nested models and list aggregation
- Update field specifications to accept
ListCompareStrategyenum directly inSpec() - Update error handling with new exceptions for invalid aggregated fields and list comparison strategy usage
- Update weight validation to support both fill_rate_weight and fill_rate_accuracy_weight
Fixed
- Fix path resolution for nested list structures and complex nested models
Full Changelog: v1.1.0...v2.0.0
v1.1.0
Core Model System with Fill Rate Computation
Added
- Add
BaseModelclass for defining typed models with automatic type validation - Add
Fieldclass to represent individual model fields with type, value, and specification - Add
FieldCollectionclass providing attribute-based access to model fields - Add
FieldSpecandSpec()function for field configuration with metadata, normalizers, fill rate functions, and weights - Add
MissingValuesentinel for representing missing or invalid field values - Add
field_normalizerdecorator for transforming field values before validation - Add fill rate computation system with
compute_fill_rate()method and statistical aggregation (mean, weighted mean) - Add support for nested models with recursive fill rate computation
- Add support for list fields with typed elements (
list[str],list[int],list[BaseModel]) - Add support for optional fields using
| Nonetype annotations - Add support for union types in field definitions
- Add comprehensive exception hierarchy (
CobjectricError,UnsupportedTypeError,UnsupportedListTypeError,MissingListTypeArgError,DuplicateFillRateFuncError,InvalidFillRateValueError,InvalidWeightError) - Add
from_dict()class method for creating model instances from dictionaries - Add readonly model instances (immutable after creation)
- Add documentation with quick start guide, API reference, and usage examples
Removed
- Remove
status()function from public API
Full Changelog: v1.0.1...v1.1.0
v1.0.1
Enhance readme & CI metadata
Added
- Add Codecov integration for coverage reporting
- Add project classifiers, keywords, and URLs to package metadata
- Add README badges for CI status, coverage, PyPI version, downloads, and code style
- Add automatic README version update in release workflow
Updated
- Update Python version requirement from
>=3.13.9to>=3.13 - Update release workflow to publish on official PyPI instead of TestPyPI
- Update coverage report format for Codecov compatibility
- Improve README documentation formatting and installation instructions
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Hello World
Updated
- Update release workflow to publish packages to official PyPI instead of TestPyPI
Full Changelog: v0.2.2...v1.0.0
v0.2.2
Improve release workflow with lockfile sync and changelog links
Added
- Add automatic
uv.lockupdate step during version bump in release workflow - Add dynamic changelog comparison link between previous and current tag in GitHub releases
Updated
- Update version bump commit to include both
pyproject.tomlanduv.lock - Update GitHub release notes to show proper changelog comparison URL (fallback to commits list for first release)
Full Changelog: v0.2.1...v0.2.2