Skip to content

Pydantic#331

Merged
robertbartel merged 290 commits intoNOAA-OWP:masterfrom
robertbartel:f/pydantic-serializable/fixed_rebase
Jun 8, 2023
Merged

Pydantic#331
robertbartel merged 290 commits intoNOAA-OWP:masterfrom
robertbartel:f/pydantic-serializable/fixed_rebase

Conversation

@robertbartel
Copy link
Copy Markdown
Contributor

Bringing Pydantic implementation into the master branch.

This builds off the existing feature branch pydantic-serializable, rebasing recent commits, resolving merge conflicts, resolving design and implementation conflicts, ensuring functionality is working as needed (confirmed by tests), etc.

aaraney added 30 commits May 25, 2023 14:48
This breaks with Serializable's convention to only exclude `None` value
fields.
The field_serializers Config option is a apping of field name to
callable that changes the default serialized form of a field (i.e.
to_dict, to_json, dict, json). This is often helpful when a field
requires a use case specific representation (i.e. datetime) or is not
JSON serializable. For example, if a field is a datetime type, this
feature enables changing how that datetime object is serialized (e.g.
ISO8601 with only seconds).

The main intent of this feature is to discourage subclasses from
overriding `dict` to implement use case specific serialization and
provide a pathway to achieve this.
robertbartel and others added 5 commits June 7, 2023 14:19
Optimizing field data structure types, __init__, and property
implementations for SimpleHydrofabricSubset.
@aaraney
Copy link
Copy Markdown
Member

aaraney commented Jun 7, 2023

@christophertubbs, @robertbartel, I think ive addressed all of the comments from @christophertubbs's first review. @robertbartel, are we ready to proceed with the merge?

@aaraney
Copy link
Copy Markdown
Member

aaraney commented Jun 7, 2023

This is a bit of an aside, for those that want to read more about the foundational changes to dmod.core.Serializable I would recommend checking out #239's description. There, motivation, implications, and examples are provided.

@christophertubbs
Copy link
Copy Markdown
Contributor

Rebase it, chief. Great job to the both of you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request maas MaaS Workstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants