Skip to content

Conversation

@bbatha
Copy link
Contributor

@bbatha bbatha commented May 27, 2020

No description provided.

@attr.s
class Notebook(object):
id = attr.ib(type=str, default=None)
machine_type = attr.ib(type=str, default=None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

@attr.s
class NotebookStart(object):
notebook_id = attr.ib(type=str, default=None)
machine_type = attr.ib(type=str, default=None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to leave the old fields in the models because the responses have not been updated to the new field names yet.

MODEL = models.Notebook

id = marshmallow.fields.Str()
machine_type = marshmallow.fields.Str(load_from="machineType", dump_to="machineType")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

MODEL = models.NotebookStart

notebook_id = marshmallow.fields.Str(load_from="notebookId", dump_to="notebookId")
machine_type = marshmallow.fields.Str(load_from="machineType", dump_to="machineType")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

@bbatha bbatha requested a review from BartoszCki June 3, 2020 20:27
@bbatha
Copy link
Contributor Author

bbatha commented Jun 4, 2020

@BartoszCki this is ready for review

@bbatha bbatha merged commit 9c1739e into master Jun 8, 2020
@bbatha bbatha deleted the feat-notebook-param-normalization branch June 8, 2020 13:59
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.

3 participants