Open sloria opened 4 years ago
Thanks! Add @xudifsd
Oh, this requires python>=3.5, we will update the code after we migrate to python3, thanks.
I would love to do this, but there doesn't seem to be any meaningful documentation surrounding how best I can contribute.
👋 Just dropping by to let you know that marshmallow v3 is released.
Upgrading will provide a few benefits for this project:
load_from
anddump_to
match, since they've been merged into a single parameter,data_key
.https://github.com/microsoft/DLWorkspace/blob/bb8ee5bf460a754be0966703b623dae79f5dfe70/src/ClusterManager/job.py#L152
You could even do automatic camel-casing using this snippet: https://marshmallow.readthedocs.io/en/latest/examples.html#inflection-camel-casing-keys
fields.Dict
to validate the type of keys and values: https://marshmallow.readthedocs.io/en/stable/api_reference.html#marshmallow.fields.DictAfter skimming the codebase, it looks like the migration will be straightforward.
load_from
anddump_to
withdata_key
.JobSchema.load[s]
to expect the deserialized data as the return value instead of a tuple. Instead of getting the errors from a tuple, handleValidationError
s.