Aperta-project / Aperta

A platform for managing the submission and review of research outputs
MIT License
11 stars 7 forks source link

APERTA-13009 Export cards as HTML; Include missing context #4119

Closed noxmwalsh closed 4 years ago

noxmwalsh commented 4 years ago

Signed-off-by: Michael Walsh noxiousthing@gmail.com

JIRA issue: https://jira.plos.org/jira/browse/APERTA-13009

What this PR does:

Updates the exports.rake task to export a lot of cards with missing information (primarily Author information) and converting the CSV generation into HTML. This is to allow consumers of these documents to better read and understand the primary gist of a card.

The HTML generation has really basic styling that is mainly used to separate unique sets of data together (for example, an author from the author card will have all of their information in one "box").

Special instructions for Review or PO:

I highly recommend you get a diverse set of papers to look at in various states (which does exist to an extend with existing seeds). Even better, if there is a dump from a real-life production use-case, that would be even better.

After a dump is retrieved, run the following Rake task for a semi-random sampling of papers in different publishing states:

bundle exec rake export:random_manuscript_zips

For just a single specific paper, just pass in doi into this Rake task:

bundle exec rake export:manuscript_zip[pbio.2000123] 

Both commands should generate zip files in the export directory. Unzip it and you should be able to see a series of .csv, .html, and other assets in the directory.

Notes

The project currently needs a lot of help since it's now on an unsupported Ruby version. On modern OS X machines, for example, it has a lot of difficulties getting started on a fresh Ruby 2.3.6 build due to OpenSSL, ZIP, and other lesser capability issues. If you're reviewing this and run into similar problems that I have, please feel free to reach out to me for workarounds.

Major UI changes

A lot of files that were CSV are now HTML. It's not the prettiest, but I think it's better than what it looked like before.


Code Review Tasks:

Author tasks (delete tasks that don't apply to your PR, this list should be finished before code review):

If I modified any environment variables:

If I need to migrate existing data:

Reviewer tasks (these should be checked or somehow noted before passing on to PO):