-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue 621 Use Voluptuous for object marshaling + object documentation #786
Conversation
Reviewed 5 of 11 files at r1. cycledash/init.py, line 26 [r1] (raw file): cycledash/init.py, line 28 [r1] (raw file): cycledash/api/init.py, line 62 [r1] (raw file): cycledash/api/init.py, line 71 [r1] (raw file): cycledash/api/init.py, line 75 [r1] (raw file): cycledash/api/init.py, line 87 [r1] (raw file): cycledash/api/init.py, line 91 [r1] (raw file): resp, status = resp[:2]
resp = marshal(resp, schema, envelope=envelope)
resp = camelcase_dict(resp)
headers = () if len(resp) == 2 else (resp[2],)
return (resp, status) + headers cycledash/api/comments.py, line 62 [r1] (raw file): cycledash/api/tasks.py, line 18 [r1] (raw file): cycledash/helpers.py, line 2 [r1] (raw file): schema.sql, line 40 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: 2 of 12 files reviewed at latest revision, 5 unresolved discussions, some commit checks pending. cycledash/api/init.py, line 91 [r1] (raw file): cycledash/api/comments.py, line 62 [r1] (raw file): cycledash/api/tasks.py, line 18 [r1] (raw file): cycledash/helpers.py, line 2 [r1] (raw file): schema.sql, line 40 [r1] (raw file): Comments from the review on Reviewable.io |
Looks good. The screenshot tests are failing on Travis. It's not clear to me why this PR would affect them, though. Review status: 2 of 12 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. cycledash/api/init.py, line 41 [r2] (raw file): cycledash/api/init.py, line 42 [r2] (raw file): cycledash/api/tasks.py, line 18 [r1] (raw file): cycledash/helpers.py, line 2 [r1] (raw file): Comments from the review on Reviewable.io |
Thanks for the review! For posterity, screenshots failing due to earlier change that no longer hid comment time; this is fixed in the following commit. Review status: 2 of 12 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. cycledash/api/init.py, line 41 [r2] (raw file): cycledash/api/tasks.py, line 18 [r1] (raw file): Comments from the review on Reviewable.io |
Use Voluptuous for object marshalling, and add object documentation direcly to those validation objects. This will let us programatically extract API documentation directly from the code. Additionally, we get to use the same EDSL for validation and marshalling objects. Document marshalled fields in code for API modules Fixes #621
Need to hide .time so the comment times don't cause screenshots to differ.
Issue 621 Use Voluptuous for object marshaling + object documentation
Use Voluptuous for object marshaling, and add object documentation
directly to those validation objects.
This will let us programmatically extract API documentation directly from
the code. Additionally, we get to use the same EDSL for validation and
marshaling objects.
Fixes #621
Migration: