-
Notifications
You must be signed in to change notification settings - Fork 8
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
Schema 4.5 - Initial release #1042
Conversation
…an branch name in Gemfile. Mod for publisher_obj.
…=true query parameter. Updated bolognese branch.
…ent to publisher handling in Doi model and controller
…lognese changes with Schema 4.5 and affiliation fixes (4a29b935017fa27545f21be877b8fb18d0f31dcc)
…on=true, as well)
…odeled after migration scripts for affiliations.
…appease audited gem.
…_dois_controller.rb
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.
Hi there :)
First off, great work on the code changes! I appreciate the effort you've put into this. The changes look good to me, but I have a few refactoring suggestions. Please feel free to review and incorporate them if they align with the context. And of course, if you have any questions or concerns about the suggestions, let's discuss!
Thanks again for your hard work!
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.
Thank you for addressing the review comments, Changes looks good to me.
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.
Thank you for making that last change in app/graphql/types/doi_item.rb
—looks great!
Purpose
Implement a first set of changes necessary to support Schema 4.5, in particular, lupo support of the additional sub-properties to the publisher attribute.
closes: #1011, #1010, #1009, #1038, #1012, #1043
related to: Bolognese PR: datacite/bolognese#166, and #1005 (Only elastic search mods left to close this task.)
Relevant documents:
Approach
Use an upgraded bolognese gem for schema 4.5 support, update the DB and the lupo API to support the new schema 4.5 elements. Ultimately, in the next release, update elasticsearch indices appropriately and add search to include the new properties.
This initial release is done as a coordinated release of lupo and bolognese (datacite/bolognese#166) to support the new schema elements, as follows:
We have added a publisher_obj field to the database, to replace the current publisher field. It will contain json with all of the publisher sub-properties, and will be be updated with each new DOI when the publisher property is set. The publisher accessor is changed to look at both publisher and publisher_obj fields, and return the new publisher obj with all properties. Appropriate validation has been added to the model.
Rake tasks have been added that will populate the publisher_obj field of DOIs that already exist. This will be run in the background after this release to ensure that the publisher_obj is updated for all DOIs.
The datacite_doi controller endpoints return publisher as a string in the response to maintain backwards compatibility, but accept publisher=true in the query and return the publisher object with all sub-properties. The endpoints also accept the the publisher string, or will accept the new publisher_obj if supplied on DOI create and update.
The activities controller has been updated to accept the publisher=true flag and to and support of the publisher sub-properties for audit and the dois/undo endpoint.
The validate endpoint has been modified to accept the publisher=true flag.
The serializers have been modified to supply the appropriate json responses.
Rspec tests and appropriate fixtures have been modified to add appropriate testing.
FUTURE RELEASES WILL INCLUDE:
Support for Elastic Search indexing of the new sub-properties and searches via the Elastic Search query strings. This will include a re-index of the datacite_dois and other_dois indices.
Cleanup - including removal of code that refers to the the old publisher field along with removal of the DB field itself.
Open Questions and Pre-Merge TODOs
Learning
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Reviewer, please remember our guidelines: