Skip to content

Releases: nigiva/cobjectric

v3.0.0

02 Jan 11:07

Choose a tag to compare

Add Pandas integration and unify result APIs

Added

  • Add pandas export helpers (to_series(), to_dataframe()) behind an optional pandas extra (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 (replace cobjectric.similarities) and update public exports accordingly.
  • Refactor list comparison typing to use the unified ModelResult API 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

01 Jan 22:19

Choose a tag to compare

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

01 Jan 21:46

Choose a tag to compare

Pre-defined Specs and Contextual Normalizers

Added

  • Add pre-defined Specs for common field types:
    • KeywordSpec for identifiers, codes, and enums with exact matching, optional whitespace stripping, and int-to-string conversion
    • TextSpec for free-form text with fuzzy matching and comprehensive normalization (lowercase, strip, collapse spaces, remove accents)
    • NumericSpec for numeric fields with intelligent type coercion (JSON Number → Python int/float) and optional tolerance-based similarity
    • BooleanSpec for boolean fields with exact matching and value conversion
    • DatetimeSpec for 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 FieldContext dataclass 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 FieldSpec to support both simple and contextual normalizers
  • Update BaseModel._build_combined_normalizer() to handle contextual normalizers and pass FieldContext when needed
  • Update field processing to preserve all FieldSpec attributes when creating combined normalizers

Full Changelog: v2.0.0...v2.1.0

v2.0.0

01 Jan 18:13

Choose a tag to compare

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"] or result["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_func decorator
  • Add support for custom fill rate accuracy functions per field via Spec(fill_rate_accuracy_func=...) or @fill_rate_accuracy_func decorator
  • 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 ListCompareStrategy enum directly in Spec()
  • 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

31 Dec 17:30

Choose a tag to compare

Core Model System with Fill Rate Computation

Added

  • Add BaseModel class for defining typed models with automatic type validation
  • Add Field class to represent individual model fields with type, value, and specification
  • Add FieldCollection class providing attribute-based access to model fields
  • Add FieldSpec and Spec() function for field configuration with metadata, normalizers, fill rate functions, and weights
  • Add MissingValue sentinel for representing missing or invalid field values
  • Add field_normalizer decorator 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 | None type 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

07 Dec 14:30

Choose a tag to compare

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.9 to >=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

07 Dec 13:56

Choose a tag to compare

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

07 Dec 13:38

Choose a tag to compare

Improve release workflow with lockfile sync and changelog links

Added

  • Add automatic uv.lock update 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.toml and uv.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

v0.2.1

07 Dec 13:22

Choose a tag to compare

Fix GitHub release description

Fixed

  • Modified the release workflow to generate a release notes file instead of using inline notes, addressing shell escaping issues.

Full Changelog: ...v0.2.1