Releases: junyoung2015/zodify
Releases · junyoung2015/zodify
Release list
v0.6.0
[v0.6.0] - 2026-03-10
Added
- Added the public
Schemabase class for class-based schema definitions while keeping validation on the existing dict engine. - Added
zodify/schema.pyas the extracted runtime module for class-based schemas while keepingValidatedDictas an internal runtime carrier. - Added comprehensive Schema-vs-dict parity coverage, typing-contract checks, package-artifact checks, and release-gate validation for the public class-based schema surface.
- Added README
Class-Based Schemasdocumentation with side-by-side dict/class examples, nested composition, supported boundaries, and intentional non-goals.
Changed
- Aligned package metadata, module version, and tests on
0.6.0. - Updated package/README positioning from "one file" to "one engine" to match the extracted runtime layout.
v0.5.0
[v0.5.0] - 2026-03-06
Added
- Added
Validatorclass with reusable default configuration (coerce,max_depth,unknown_keys,error_mode) and per-call overrides. - Added comprehensive
tests/test_validator_class.pycoverage for defaults, override non-mutation, multi-instance isolation, and parity with barevalidate(). - Added README
Configurationsection documentingValidatorusage and call-level override patterns while retaining barevalidate()as the recommended starting point.
Changed
- Refactored mode-option validation into shared internal helper logic to keep
validate()andValidatoroption contracts aligned. - Updated static typing configuration for pyright package-targeted checks (
[tool.pyright] include = ["zodify"]). - Updated benchmark comparison harness to use zodify's dict-schema API directly.
v0.4.1
[v0.4.1] - 2026-03-04
Added
- Added six runnable example scripts in
examples/:basic_validation.py,nested_schemas.py,custom_validators.py,union_types.py,env_config.py, andstructured_errors.py. - Added
tests/test_examples.pysmoke coverage for required example presence, runnable entrypoints, expected-output verification, and runtime API usage checks. - Added public API export parity assertion to keep
__version__included inzodify.__all__. - Added package-boundary verification policy for examples (wheel excludes runtime examples; source distribution may include them for documentation visibility).
- Added README
Schema Compositionsection showing plain-dict schema reuse, nested composition, nested union member usage, and a runnable reference toexamples/nested_schemas.py. - Added README consistency updates:
Schema compositioncomparison-table row, roadmap status aligned tov0.4.1, and release tagging example updated togit tag v0.4.1.
v0.4.0
[v0.4.0] - 2026-03-02
Added
ValidationErrorexception class: subclassesValueErrorwith.issuesattribute containing structuredlist[dict]of validation failures. Each issue dict haspath,message,expected, andgotkeys.error_modeparameter onvalidate():error_mode="structured"raisesValidationErrorwith machine-readable.issues; defaulterror_mode="text"preserves existingValueErrorstring behavior.- Structured error output covers all error types including union mismatch (
str | int), coercion failure, custom validator failure, depth exceeded, and unknown key errors. - copy/deepcopy/pickle support for
ValidationErrorvia__reduce__.
v0.3.0
[v0.3.0] - 2026-03-02
Added
- Union type support:
str | intruntime schema syntax for validating values against multiple types. - Union coercion with left-to-right priority: when
coerce=True, union members are tried in declaration order — first exact match (non-str types), then coercion attempts. First success wins.
Known Limitations
strcatch-all in union coercion: whenstris a union member andcoerce=True, any value that fails earlier union members will fall through tostr()coercion (e.g.,int | strwithTrueproduces"True"). Placestrlast in unions to use it as a fallback.
v0.2.1
[v0.2.1] - 2026-03-01
Added
- PEP 561
py.typedmarker file for type checker recognition. - Inline type annotations on all public and internal symbols.
@overloadsignatures forenv()enabling IDE type inference (e.g.,env("PORT", int)infersint).- Google-style docstrings with usage examples on all public API symbols (
validate,env,Optional). - mypy (strict mode) and pyright CI gates as merge-blocking checks.
Changed
- Internal function docstrings (
_coerce_value,_check_value,_validate) trimmed to one-line per architecture pattern. - flake8 CI step changed to report-only (
--exit-zero) — type checkers now handle correctness gating.
Known Limitations
Optionaldefault values are not type-checked.Optional(int, "text")will use the string default without validation. Verify your defaults match the expected type.- When
coerce=Truewith target typestr, any value is accepted via Python'sstr()builtin (e.g.,str(None)becomes"None"). Non-string targets require string input for coercion.
v0.2.0
[v0.2.0] - 2026-02-27
Added
max_depthparameter onvalidate()with default of 32 to prevent stack overflow from deeply nested data.- Custom validator functions: use any callable (lambda or function) as a schema value for value-level validation beyond type checking.
unknown_keysparameter onvalidate()with default"reject"to control handling of extra keys in data. Use"strip"for previous silent-ignore behavior.- Performance benchmark scripts (
benchmarks/) for compliance verification: import time, validate speed, env overhead.
Changed
- Internal error representation refactored from format strings to structured 4-tuples
(path, message, expected, got)for future structured error support. validate()parameters afterdataare now keyword-only (enforced via*).test_env.pyextracted fromtest_zodify.pyfor cleaner test organization.- Unknown keys in data are now rejected by default. Use
unknown_keys="strip"to restore v0.1.0 behavior. - CI pipeline now includes benchmark reporting on Python 3.12 (non-gating).
v0.1.0
[v0.1.0] - 2026-02-25
Added
- Nested dict schema validation with recursive validation and dot-path errors (for example,
db.port). Optionalschema marker with optional defaults for missing keys.- List element typing via single-element schema lists (for example,
{"tags": [str]}), including nested list-of-dict support. - Broader automated test coverage for nested schemas, optionals, list validation, and coercion edge cases.
Changed
- Updated README with v0.1.0 examples for nested dicts, optional keys, and list element validation.
- Updated package metadata and versioning to
0.1.0.
Fixed
- CI/publish workflow robustness for install/test/build flow and release handling.
- Packaging metadata cleanup in
pyproject.toml(license format/classifier cleanup).
v0.0.1
Full Changelog: https://github.com/junyoung2015/zodify/commits/v0.0.1