roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

New maDMP DMP ID (aka DOI) minting

Open briri opened this issue 4 years ago • 1 comments

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

Screen Shot 2021-08-18 at 2 11 58 PM Message displayed when all of the requirements have not yet been met Screen Shot 2021-08-18 at 2 04 46 PM Message displayed when all requirements have been met Screen Shot 2021-08-18 at 1 56 36 PM Message displayed after the DMP ID is registered Screen Shot 2021-08-18 at 1 58 34 PM How the DMP ID is displayed on the 'Project Details' tab Screen Shot 2021-08-18 at 2 01 29 PM 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_tab config 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_id and citation method to the Plan model
  • Added a new mint route and action to the PlansController that calls the mint_dmp_id method 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? and notify_subscribers callback 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_administrators mailer 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

DB changes

  • Added a new subscriptions table.

briri avatar Aug 18 '21 21:08 briri

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 avatar Dec 01 '21 17:12 briri

@briri DMPonline is happy to implement this but developers need to check technical details with you. To be discussed at next developers meeting.

dsisu avatar Sep 08 '22 10:09 dsisu