-
Notifications
You must be signed in to change notification settings - Fork 216
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
Fix REST API attributes_filter
and extras_filter
#3556
Fix REST API attributes_filter
and extras_filter
#3556
Conversation
The node_type had a final dot missing in the hard-coded mapping to generate the correct full types for process node namespaces of external plugins.
…_incorrect_full_type_mapping
Fixes aiidateam#3555. The REST API attributes_filter and extras_filter were not working correctly when pagination is requested. Without pagination they return attributes and extras dictionaries with the keys specified in attributes_filter and extras_filter as expected. When pagination is added they return instead the attributes keys as attributes.key, which is not consistent with the expected behavior.
Thanks! Could you add a test to check this please? |
@asle85 could you please still add the additional tests that we discussed? Then I can merge this and prepare the release. Thanks |
Improved tests on attributes_filter and extras_filter and added the two additional tests. |
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.
Thanks a lot @asle85 , there is one final thing to fix. If you could do that and then make sure the branch is up to date with develop I can approve and merge.
aiida/backends/tests/test_restapi.py
Outdated
############### node get one attributes_filter with pagination ############# | ||
def test_node_single_attributes_filter(self): | ||
""" | ||
Check that when only one node extra is specified in extras_filter |
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.
You still have "extra" twice in this docstring but should be "attribute".
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.
Sorry, fixed it.
Improved tests on attributes_filter and extras_filter with pagination. Added tests to check only one attribute or extra filter together with pagination.
…55_restapi_attributes_filter
2a45827
to
55a1512
Compare
Thanks @asle85 |
Fixes #3555.
The REST API
attributes_filter
andextras_filter
were not working correctly when pagination is requested.Without pagination they return attributes and extras dictionaries with the keys specified in
attributes_filter
andextras_filter
as expected.When pagination is added they return instead the attributes keys as
attributes.key
, which is not consistent with the expected behaviour.Changed REST API version to 4.0.1.