Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic #331

Merged

Conversation

robertbartel
Copy link
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
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
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
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