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

New maDMP Research Outputs tab #2992

Merged
merged 32 commits into from
Apr 6, 2022
Merged

New maDMP Research Outputs tab #2992

merged 32 commits into from
Apr 6, 2022

Conversation

briri
Copy link
Contributor

@briri briri commented Aug 4, 2021

maDMP features

  • Added a new 'Research Outputs' tab to the edit Plan pages Allow a plan to define multiple research outputs #2738 Move Research Outputs tab #2814
  • Added a Metadata Standard selector to the Research Outputs page (allows user to select multiple standards) Add metadata standard selector for Research Outputs #2798
  • Added a License selector to the Research Outputs page Add question type with controlled vocabulary for license types  #2607
  • Added a Repository selector to the Research Outputs page (allows user to select multiple repos) Integration with re3 Data Registry  #2605
  • Include Research Outputs as an appendix to the Plan's PDF Modify download options to include support for new Research Outputs data #2812 Also includes a checkbox that allows the user to include/exclude it from the PDF
  • Updated API V1 to convey the new Research Output info as Datasets in the JSON output
  • Updated API V1 to extract some narrative elements from the Plan. It will find themed questions and build out a narrative (for example if there were 2 questions themed as "Preservation then it would set the preservation_statement in the JSON as: "<p><strong>Question:</strong> What is your favorite color?<br><strong>Answer:</strong> blue</p><p><strong>Question:</strong> Why?<br><strong>Answer:</strong> Because I do!</p>"). The theme to element mapping is:
    • The data_quality_assurance is populated from questions themed as "Data Collection"
    • The preservation_statement is populated from questions themed as "Preservation"
    • The security_and_privacy is populated from questions themed as "Ethics & privacy" and "Storage & security"
  • Added config options that allow an installation to:
    • Disable/enable the Research Outputs tab entirely
    • Disable/enable the License selector
    • Disable/enable the Metadata Standard selector
    • Disable/enable the Repository selector
    • Disable/enable each of the individual narrative extractions (described in the bullet above)

Other features/fixes

  • Added a new generic modal search dialog. This component allows the page to define its own search/filter options and display search results in its own way. (Included a README.md in the app/views/layouts/modal_search dir to help describe how to implement)
  • Added a 'green' color to the CSS
  • Modification to the way the Plan is associated with it's grant (basically a shortcut to get at the identifier record)
  • Added new Services (and corresponding config files) to services/external_apis that fetch data for the License, Metadata Standard and Repository tables
  • On the Plan PDFs I changed the title of the coversheet to "Plan Overview". When adding the new "Research Outputs" page I noticed that the coversheet and plan itself had the same names which makes it look odd in the PDF table of contents.
  • Added a lot of tests

DB changes

  • Added a 'licenses' table - populated via the SPDX API: rails external_apis:load_spdx_licenses
  • Added a 'metadata_standards' table - populated via the RDA MSC API (hosted by Univ. of Bath): rails external_apis:load_rdamsc_standards
  • Added a 'repositories' table - populated via the re3data API: rails external_apis:load_re3data_repos

@briri briri requested a review from raycarrick-ed August 4, 2021 18:15
@briri
Copy link
Contributor Author

briri commented Aug 4, 2021

Hey @raycarrick-ed can you have a look at this Postgres error when you have a few minutes? I added some logic to switch between a Mysql and Postgres version of the Regex query but there seems to be something wrong with the Postgres version.

Added tests

added tests for new external_api services

Added test for new presenter

change migration classname

fixes for rubocop and rspec

offerings to the rubocop gods

cleanup of unused code and added config for license opts

fixed tests

cleaned up schema

Fix for postgres regex matching

Fix for postgres regex matching

trying to fix postgres

updated config to disable research_outputs by default

updated plans_controller to work with new Plan.grant setter method

removed debug lines

fixed typo in plan model and added dependent destroy on a few associations

removed debug lines

fixed bug in v1 api due to removed Plan.api_client column

updated plan spec factory so that :creator ensures the owner's org matches the plan.org

added api_client association back to plans model. Added some Mysql vs Postgres helper methods to the ApplicationRecord base class

making rubocop happy

fix typo

making rubocop happy

trying to fix postgres :/

Hopefully fibally fixed postgres

Hopefully fibally fixed postgres

Hopefully fibally fixed postgres
@briri briri force-pushed the madmp-research-outputs branch from 6d77d60 to b52f735 Compare August 6, 2021 17:13
@briri
Copy link
Contributor Author

briri commented Aug 9, 2021

finally passing! 😓

@briri
Copy link
Contributor Author

briri commented Aug 18, 2021

FYI @benjaminfaure these changes may be of interest for your installation

@briri
Copy link
Contributor Author

briri commented Dec 1, 2021

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
Copy link
Contributor Author

briri commented Feb 2, 2022

@raycarrick-ed this has been updated with all the latest from development and master. Will review with you all at our next dev meeting

@nicolasfranck
Copy link
Contributor

method process_grant is removed from PlansController? Now the plan cannot be updated anymore from the detail page

@nicolasfranck
Copy link
Contributor

I guess all that is left is to add model validation? (which is also a way to document the model)

@briri
Copy link
Contributor Author

briri commented Apr 5, 2022

Any objections to merging this one @raycarrick-ed?

Copy link
Contributor

@raycarrick-ed raycarrick-ed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have time to go through every line so merged it into a copy of current development branch and with the _dmproadmap.rb as shipped, nothing changed. So that's good. When I turned all the madmp stuff on the research outputs appeared and the changes came into project detais as expected and it all seemed to run ok. So I think that all looks fine.

@briri
Copy link
Contributor Author

briri commented Apr 6, 2022

thanks for reviewing it @raycarrick-ed. I will merge then. The new research outputs tab is pretty self contained so teams can leave it disabled until they're ready.

@briri briri merged commit f1110b1 into development Apr 6, 2022
@briri briri deleted the madmp-research-outputs branch April 6, 2022 14:39
@nicolasfranck
Copy link
Contributor

Is there any relation to the behaviour of research outputs (or future intended behaviour) in dmpopidor (the French flavour)?

This approach uses a fixed set of questions which is hardcoded, and there requires adding new table fields when new questions are needed.

@briri
Copy link
Contributor Author

briri commented Apr 11, 2022

There is not at this time @nicolasfranck. The work done in the DMPTool was done in parallel with DMPOpidor's efforts. The table was based off of the original DMPOpidor table.

DMPOpidor's research outputs are tightly tied to a new way of building templates and storing them as JSON in the DB. The JSON contains both the content of the sections and questions but also the description of their structure (e.g. question A is a text area field). There is then logic that builds the page based on this JSON. @benjaminfaure can probably do a much more thorough job of explaining the difference 😄

One of the nice things about the approach DMPOpidor took is that it is compatible with the current DMPRoadmap way of dealing with templates (they can be used in parallel.

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