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

Added method_decorators into rest api resources #991

Merged
merged 6 commits into from
Dec 19, 2017

Conversation

waychal
Copy link
Contributor

@waychal waychal commented Dec 14, 2017

method_decorators keyword argument is added into rest api resources to pass the list of decorators to apply on endpoints

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

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

Anyhow, so in the end these are really all the changes we need in aiida?
Very nice!

@@ -192,6 +193,7 @@ def __init__(self, **kwargs):
self.utils_confs = {k: kwargs[k] for k in utils_conf_keys if k in
kwargs}
self.utils = Utils(**self.utils_confs)
self.method_decorators = {'get': kwargs.get('get_decorators', [])}
Copy link
Member

Choose a reason for hiding this comment

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

Ok, so is there a good reason why Node does not inherit from BaseResource?
The explanation below "class Node(Resource)" is not entirely clear to me, perhaps you could make it a docstring and expand it a little bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NodeResource class is different from BaseResource in trans.set_query() mostly because it takes query_type as an input and the presence of additional result types like "tree". I have updated the doc string.

@@ -336,3 +335,4 @@ def handle_error(self, e):

else:
raise e
"""
Copy link
Member

Choose a reason for hiding this comment

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

If you want to comment the function, please use # (don't make it a string).
Also, is there a better alternative to commenting it? Do we want to get rid of it or not?

waychal pushed a commit to waychal/aiida_core that referenced this pull request Dec 18, 2017
…. This is now in the optional requirements. also update command-line for verdi data structure import using the qeinputparser
@ltalirz ltalirz merged commit eb41e3e into aiidateam:develop Dec 19, 2017
@waychal waychal deleted the auth_extension branch December 19, 2017 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants