New maDMP DMP ID (aka DOI) minting
maDMP features
This PR introduces the ability to register DMP IDs for your plans. A DMP ID is a persistent identifier that users can cite and reference in other systems. If someone (a user's browser or an external system) resolves the DMP ID (e.g. https://doi.org/10.123/12ab.c3) the system will render the appropriate landing page (e.g. if using DataCite, will display the metadata record in the appropriate format, if using the DMPHub will end up on that site's landing page).
Note that this includes 2 options for registering/minting DMP IDs. New options can be easily added by creating a new app/services/external_apis/your_service.rb that inherits from the ExternalApis::BaseDmpIdService and a corresponding config/initializers/external_apis/your_service.rb. Use the DataciteService as a reference when building your own service.
Screenshots of functionality prior to DMP ID registration
Message displayed when all of the requirements have not yet been met
Message displayed when all requirements have been met
Message displayed after the DMP ID is registered
How the DMP ID is displayed on the 'Project Details' tab
DMP IDs appear in all Plans tables when applicable.
The DMP ID appears as the dmp_id in the API V1 JSON output, and also appears on the plan coversheet in the PDF export
DMP ID features
- Added a new
madmp.show_collaborators_on_share_tabconfig setting that enables/disables this feature (disabled by default) - Added a new generic DmpIdService class that acts as a proxy to the selected DMP ID minting service. Controllers interact with this generic service which then delegates tasks to the appropriate minting service.
- Added a DataciteService that adds/updates DMP IDs through DataCite (requires that you are a DataCite member!)
- Added a DMPHubService that adds/updates DMP IDs through an installation of the DMPHub. The DMPHub is an open source proxy service that uses EZID to acquire DMP IDs and provides a landing page for the DMP.
- Added a new
dmp_idandcitationmethod to the Plan model - Added a new
mintroute and action to the PlansController that calls themint_dmp_idmethod on the DmpIdService - Added a Subscription model and a Subscribable concern. When a DMP is first registered (when it's DMP ID is acquired), the DMP ID service is set up as a subscriber of that DMP. When changes are made to that DMP (e.g. the title changes, a contributor is added, etc.) an update gets sent to the DMP ID service.
- Added a new ActiveJob called NotifySubscriberJob so that updates to subscribers are not run within the main Rails thread. Note that the default for Rails is to use RAM to keep track of the job queue (ActionMailer is currently using this queue). This means that if the server is rebooted or your application crashes, all queued jobs will be lost. ActiveJob is robust though and allows you to use other services like Resque, Delayed Job, etc. see the docs for more info: https://edgeguides.rubyonrails.org/active_job_basics.html
- Added a
versionable_change?andnotify_subscriberscallback that notifies the DMP ID service when a plan has been updated - Added a new DMP ID registration section to the 'Share' tab (or 'Finalise / Publish' tab if enabled ... see below for details)
- Updated all tables that display plans to show the DMP ID is applicable
- Added the link to the DMP ID on the project details page and PDF coversheet
- Updated the API V1 to use the DMP ID if available
- Added a full suite of tests
Other changes
- Renamed the old 'share' route to 'publish'
- Added a new
notify_administratorsmailer that is currently used if the DMP ID service fails. An email with the error and backtrace are sent to the admins defined in the config - Updated contributors, identifiers so that when they are changed, their parent's updated_at date changes. This is a step towards versioning plans and also allows the system to notify subscribers should a contributor be added to a plan for example.
- Added a config option called 'show_overview' that allows the 'Overview' tab to be disabled. It is enabled by default
- Added a config option called 'show_collaborators_on_share_tab' (true by default) which has the following behavior:
- True
- Leaves all tabs as they were and displays the DMP ID registration section at the bottom of the 'Share' tab
- False
- Renames the 'Contributors' tab to 'Collaborators' and move the Collaborators section from the 'Share' tab to the 'Contributors tab'.
- Renames the 'Share' tab to 'Finalise / Publish' which now displays the Visibility options and the new DMP ID registration
- True
DB changes
- Added a new
subscriptionstable.
NOTE THAT THIS PR IS LIKELY OUT OF DATE WITH DMPTOOL
The DMPTool has had many updates since this PR was first created so an eval of these changes should be done to ensure that any bug fixes are included
@briri DMPonline is happy to implement this but developers need to check technical details with you. To be discussed at next developers meeting.