Pydantic: update divisions to match data & fix constraints#450
Pydantic: update divisions to match data & fix constraints#450Adam Lastowka (Rachmanin0xFF) wants to merge 5 commits intodevfrom
Conversation
packages/overture-schema-divisions-theme/tests/division_baseline_schema.json
Show resolved
Hide resolved
Jennings Anderson (jenningsanderson)
left a comment
There was a problem hiding this comment.
LGTM.
Just to confirm — the json files in tests are autogenerated, correct?
Should we be excluding these generally and generating them within actions or something else?
Yes, but only on demand (typically in response to changes made to the schema and compared to the previous version tracked by git to ensure that the differences are expected).
IMO, in their current form they should be checked in. Whether this mechanism should exist at all is a different matter; rather than testing the JSON Schema, we may want to consider a different mechanism to check the behavior of individual Pydantic models (I don't know what this would look like). |
packages/overture-schema-divisions-theme/tests/division_area_baseline_schema.json
Outdated
Show resolved
Hide resolved
9066407
A couple small updates to Pydantic that are in my Parquet validation branch
Description
AdminLevelfromuint8toint32to match actual division dataModelConstraint.decoratevalidator dispatch: replace bound method with a closure to prevent Pydantic from rebinding self to the model instance