-
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
Codifies flask api helper example #1
Codifies flask api helper example #1
Conversation
- Codifes the example that lived in the README - Adds tests to validate example works when releasing - Extracts schema definition from example provider - Adds README to example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a couple minor things in the README, and a suggestion on a bit of doc within the example's schema and this looks good.
@@ -491,7 +491,7 @@ Server and create required Scopes. | |||
library will not be able to, and will therefore not attempt to, retrieve | |||
a user's groups and so no policies based on Groups may be used. We | |||
encourage you to consult the `Globus Auth Documentation | |||
<https://docs.globus.org/api/auth/>`_ for more information on creation | |||
<https://docs.globus.org/api/auth/>`__ for more information on creation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a double underscore? Perhaps that's RST I don't know off the top of my head.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea the rst linter I'm running caught that as a Duplicate explicit target name error
. Apparently, using a double underscore marks the link as an anonymous reference (seen from this stack overflow q)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's new to me. What rst linter are you using? Perhaps I should do it also (and maybe we should make it a test target of some sort).
README.rst
Outdated
if __name__ == "__main__": | ||
main() | ||
|
||
The example in the Appendix demonstrates how these functions can be implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no appendix any more right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, good catch!
"title": "Skeleton Action Provider Input Schema", | ||
"type": "object", | ||
"properties": { | ||
"input_string": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe good to add a description property here more or less to set the example that it is good to document your properties this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be good too -- I didn't even know the description keyword was an accepted property. I expect whatever we document here will get copied around so adding it will make a difference.
EDIT: I updated both examples' schema's property definitions with the description
- Removes reference to the appendix - Adds the "description" field to both examples' schema property - Fixes package structure in python imports
Adds example for the Flask API helpers which can be run, linted, and tested. This should help us further verify that changes made to the toolkit preserve functionality. Breaking changes should be caught before a release is made. Additionally, the example demonstrates how one can test an ActionProvider.