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

Codifies flask api helper example #1

Merged
merged 4 commits into from
Jun 11, 2020

Conversation

urimandujano
Copy link
Contributor

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.

Uriel Mandujano - Globus added 3 commits June 8, 2020 14:42
- 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
@urimandujano urimandujano added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 8, 2020
@urimandujano urimandujano self-assigned this Jun 8, 2020
Copy link
Contributor

@jimPruyne jimPruyne left a 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
Copy link
Contributor

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.

Copy link
Contributor Author

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)

Copy link
Contributor

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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": {
Copy link
Contributor

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.

Copy link
Contributor Author

@urimandujano urimandujano Jun 11, 2020

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
@urimandujano urimandujano merged commit 7792ef4 into master Jun 11, 2020
@urimandujano urimandujano deleted the enhancement/add-flask-api-helper-example branch June 11, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants