-
Notifications
You must be signed in to change notification settings - Fork 88
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
feature: add OAI-PMH API #891
Conversation
05d8389
to
b643d00
Compare
feature: implement search fix: pass correct action to require_permission
test: add tests for OAI API
fix marshmallow deprecation warnings
b643d00
to
e9fa14b
Compare
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.
Overall looks very good!!! The review is on some few minor details, and once fixed it's good to merge.
|
||
"""Result items for OAI-PMH services.""" | ||
|
||
from invenio_records_resources.pagination import Pagination |
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.
Comment: Not something to fix now for this PR, but I think we need to move some of this code to Records-Resources, and see how we can make it more reusable. I've seen it slightly duplicated many places with minor modifications. Again, this is more a comment for myself :-)
@@ -0,0 +1,232 @@ | |||
# -*- coding: utf-8 -*- |
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.
Minor: Extra tests I'd like to see:
- It should not be possible to edit a managed set.
- Try with bogus search patterns, very long strings etc. (try to break it a bit more 💣 😀 )
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.
-
Managed sets are not implemented yet, as this has not been discussed properly afaik (adding/removing records manually, managed flag not present)
-
Since the indexing happens automatically after inserting the set in the db through signals, the only way to check if the
search_pattern
is valid or not is to try indexing before (and then it gets reindexed again afterwards).- global: disable signals invenio-oaiserver#215
- should probably revisit https://github.com/inveniosoftware/invenio-oaiserver/blob/725f80056f05fefbfcc90e0994694230f38fbe9d/invenio_oaiserver/percolator.py#L75-L114
- add index as a parameter to only create percolator document once
- validate search pattern and raise an error if it is not valid
depends on inveniosoftware/invenio-oaiserver#206
Adds API for OAI-PMH sets