Skip to content

test(extension_types): add computed_field and validator tests for pydantic (ITL-142)#212

Merged
eywalker merged 2 commits into
mainfrom
eywalker/itl-142-add-pydantic-v2-support-to-orcapod-via-arrow-struct-encoding
Jul 7, 2026
Merged

test(extension_types): add computed_field and validator tests for pydantic (ITL-142)#212
eywalker merged 2 commits into
mainfrom
eywalker/itl-142-add-pydantic-v2-support-to-orcapod-via-arrow-struct-encoding

Conversation

@kurodo3

@kurodo3 kurodo3 Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes ITL-142.

Pydantic v2 BaseModel support was already fully implemented and automatically
registered in the default context (v0.1.json) — this PR fills the last two test
gaps identified during the ITL-142 verification pass:

  • test_computed_field_not_stored: pins that @computed_field properties are
    excluded from the Arrow struct schema (only model_fields is walked, not
    model_computed_fields). Prevents a future refactor from accidentally including
    computed properties in Arrow serialization.
  • test_validator_runs_on_decode: confirms that Pydantic validators run during
    reconstruction from Arrow storage (via Model(**kwargs)), and documents that
    non-idempotent validators may produce asymmetric round-trips — a Pydantic
    property, not an Orcapod bug.

No production code changes — both behaviours were already correct.

Test plan

  • uv run pytest tests/test_extension_types/test_pydantic_logical_type_factory.py -v → 33 passed
  • uv run pytest tests/test_extension_types/ tests/test_hashing/test_pydantic_dataclass_hashing.py -v → all passed

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@eywalker eywalker merged commit 22da592 into main Jul 7, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant