Skip to content
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

React prototype #525

Merged
merged 524 commits into from
Jan 17, 2024
Merged

React prototype #525

merged 524 commits into from
Jan 17, 2024

Conversation

briri
Copy link
Collaborator

@briri briri commented Dec 9, 2023

Changes proposed in this PR:

There is a lot here. Please read through everything and note that the following need to be run as part of the deployment:

  • Run rails db:migrate
  • Run rails v5:upgrade_5_0 which will add API info to the registry_orgs records for NIH, NSF, NASA orgs and some that have grant ids in Crossref as well
  • Update and then run the rails v5:enable_v5_pilot with the names of the Orgs you want to be a part of the React prototype pilot
  • Run enable_v5_pilot:move_dmp_idswhich will move existing DMP IDs from theidentifierstable to theplans.dmp_id` field
  • Run rails v5:build_narratives to rebuild all of the existing public plans PDF files and store them in ActiveStorage
  • Run rails v5:seed_dmphub to seed the new DMPHub system with your DMP IDs (if you use the DMPHub and are transitioning to the new system)
  • Start up the delayed_job daemon (when deploying to a server). This should only run on a single instance if your system is load balanced.

Updated Terms of Use

  • Updated the "Terms of Use" page to remove Google Analytics and replace with Matomo info
  • Updated the "Terms of Use" page and added info about "Sharing and Reuse" so that we cover the use of public plans for training a future LLM.
  • Added a checkbox to the page where the user can change their plan's visibility. If the use selects public, then they must accept the new terms.

v4 Cleanup

  • Removed column repositories.custom_repository_owner_template_id
  • Removed column research_outputs.output_type
  • Removed column research_outputs.output_type_description

ActiveStorage for Public DMPs:

  • Added ActiveStorage tables (boilerplate)
  • Added gems aws-sdk-s3 and active_storage_validations
  • Updated the PlanExportsController so that it will serve up a copy of a public plan's PDF from the designated S3 bucket when the requestor is not logged in (prevents bots that crawl the site from bogging down the server)
  • Added narrative to the Plan model which stores PDF narratives for public plans.
  • Updated the config/environments/*.rb to use S3 for ActiveStorage (or local disk for development)
  • Udated config/storage.rb to define S3 bucket

Added Delayed Job

  • Added delayed_jobs table
  • Added gems delayed_job_active_record and daemons
  • Added subscriber_job_status and publisher_job_status to plans and drafts tables.
  • Added delayed_job and daemons gems so that some of the longer running processes that connect to external content do not bog down the system.
  • Added a CitationJob to fetch DOI citations asynchronously
  • Updated the NotifySubscriberJob to work with the new delayed_job framework
  • Added an OrcidPublisher job to make that piece of DMP registration async
  • Added a PdfPublisher job that will send the PDF narrative document to the DMPHub asynchronously

React DMP Upload Prototype:

  • added new column plans.dmp_id to begin storing the DMP ID directly in the plans table
  • added new columns to the registry_orgs table to store information about how to connect to their external APIs
  • added a new related_identifiers type called output_management_plan
  • added a new orgs.v5_pilot boolean field that determines whether or not the user can access the new React prototype pages (user must also be an org admin)
  • added a new dmphub_auth_url configuration item to the config/dmproadmap.yml file
  • added a config/initializers/cors.rb to support external comms
  • new Dockerized development environment
  • added new gems rack-cors and text
  • Added a drafts table to store unregistered "in progress" DMPs created by the new React dashboard
  • Added a hidden_dmps table to support user's indicating that they do not want to see a registered DMP on their dashboard
  • All of the new JS/SCSS code for the React prototype reside in the react-client directory in the project root
  • Added API v3 components (controllers, views, presenters) that are meant to support the new pilot testing of the ReactJS DMP Upload forms
    • /api/v3/me returns the currently logged in user's name and email
    • /api/v3/contributor_roles returns the list of valid contributor roles
    • /api/v3/output_types returns the list of valid research output types
    • /api/v3/related_work_types returns the list of valid related work types
    • /api/v3/affiliations provides search/typeahead support for affiliation form fields
    • /api/v3/funders provides search/typeahead support for funder form fields
    • /api/v3/repositories provides search/typeahead support for repository form fields
    • /api/v3/awards/nih endpoint used to search the NIH API for projects
    • /api/v3/awards/nsf endpoint used to search the NSF and NASA API for projects
    • /api/v3/awards/crossref/*fundref_id endpoint used to search the Crossref Grants API (DOE, etc.) for projects
    • /api/v3/simulations endpoint which is used to simulate the discovery (by external systems) of related works
    • /api/v3/citations endpoint to retrieve BibTex citations for a given DOI
    • /api/v3/drafts Full REST support for creating/updating/deleting Draft DMPs (aka DMPs that have not been registered)
    • /api/v3/dmps Full REST support for creating/updating Registered DMPs (aka ones with a DMP ID)
  • Updated the Org_Selectable controller concern to work with new React Org typeahead
  • Updated the DoiService and DmphubService to allow both Plan and Draft to be sent to the DMPHub for registration/updates.
  • Added a new DashboardsController that serves up the React content
  • Updated PlansController to use the new Registrable model concern
  • Added a new dmp_id_for_display to the DmptoolHelper
  • Updated the IdentifierHelper to work with the new Registrable model concern
  • added a new react-application JS asset so that the React pages get a more compact JS file than the standard Rails one
  • added a Registerable model concern and included it on the Plan and new Draft models. This involved moving some of the functionality that was on the Plan model to the new concern.
  • Updated v2 JSON to remove newlines and non breaking spaces from larger text fields
  • Updated the User model to have drafts (used exclusively by the React prototype) and hidden_dmps for when a user opts to no longer see a registered DMP on their React dashboard
  • Updated Plan children (e.g. Contributor and Answer) to call the NotifySubscriberJob
  • Updated Presenters and Views to work these changes
  • Updated existing gem and JS dependencies

Andre Engelbrecht and others added 30 commits August 25, 2023 14:37
…oard with a small form to allow DMP IDs to receive simulated related work content
- Project search should not be available if the funder doesn't have an
  api
- Started adding correct statuses starting with contributors
- Various requested changes and bugfixes discovered while working on
  above
fixed related bugs discovered while working on this.
…t been done. fixed issue with PDF publisher job
... added this to out handleResponse method. This way we can deal
with the error and have access to the actual response that was
received.
@briri briri changed the base branch from main to v5 January 17, 2024 18:20
@briri briri merged commit 4b575b6 into v5 Jan 17, 2024
4 of 8 checks passed
@briri briri deleted the react-prototype branch January 17, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants