Skip to content

v0.2.0

Choose a tag to compare

@nashabanov nashabanov released this 25 Dec 11:54
· 91 commits to main since this release
972dd70

Added

  • Typed constraint system: Replaced ConstraintSpec with concrete, type-safe constraint classes:
    • MinLength, MaxLength, Pattern for strings
    • GreaterThan, GreaterOrEqual, LessThan, LessOrEqual for numeric (int and float)
  • Full compability with new syntax Annotated[T, MinLength(10)] (recommended)
  • Support for mixed constraint definitions (typed + strings + metadata)

Changed

  • BREAKING: Removed ConstraintSpec from public API and internal logic
  • BREAKING: Constraint validation now happened in parse time (not at generation time)
  • Refactored internal architecture:
    • Separeted constraint definitions (constraints/) from data specs (specs/)
    • Moved ConstraintType and validation sets to constraint/types.py

Removed

  • Deprecated string only constraint syntax in internal logic (still supported for users)