pharmaR / riskassessment

Risk Assessment Demo App: https://rinpharma.shinyapps.io/riskassessment
https://pharmar.github.io/riskassessment/
Other
98 stars 25 forks source link

Download reports for pkg dependencies into single zip file #722

Open AARON-CLARK opened 7 months ago

AARON-CLARK commented 7 months ago

I think we need a good way of generating a report for all of a package's dependencies at once. So, for example, The AATtools pkg has 4 imports. So, while previewing AATtools in the Build Report tab, it would be nice if the user had a checkbox to download reports for it's dependencies and include them in a zip file. This could exist in the Build Report preferences with all the other checkboxes. However, maybe give the user more options. It could look like this:

Prepare report for:

If any of the dependencies are not uploaded, a modal should pop up when the Download Report button is clicked stating that "Only the packages uploaded to the database will have a report generated. If you want to upload more pkgs, please navigate to the Package Dependencies page." ... and then you could include a button to help them navigate there. Bonus points if you include a small summary of what's uploaded in the modal, including:

Dependencies in database:

But you only need to show the bullet point above if they checked that box. So if they only checked "depends" and "imports", then don't show a summary for "linking to" and "suggests".

In conclusion, this could impact things on the database tab pretty significantly, since a user could select 2 or more pkgs from the database, and when the "Prepare report for" checkbox is marked, it would not only download a report for those selected packages, but also for all the marked dependencies. A summary would be confusing, so that could be left out of that modal on the database tab.