insightsengineering / thevalidatoR

Github Action that generates R Package Validation documentation 🏁
https://github.com/marketplace/actions/r-package-validation-report
MIT License
57 stars 5 forks source link

Add riskmetric scoring across categories #18

Closed epijim closed 2 years ago

epijim commented 2 years ago

See issue #17 as the original discussion.

This is simply about adding the categories - e.g. code like below:

params$pkg_dir %>% # reference dplyr
  riskmetric::pkg_ref() %>%
  #tibble::as_tibble() %>%
  riskmetric::pkg_assess() %>%
  #riskmetric::pkg_score() %>% 
  purrr::map(1)  %>% 
  lapply(as.character) %>%
  tibble::enframe() %>% 
  tidyr::unnest(cols = dplyr::everything()) %>%
  dplyr::rename(Metric = name, Status = value) %>%
  kable(
    caption = "Metric assessed by the R package riskmetric"
  )
epijim commented 2 years ago

Above seems horrific - but the riskmetric object doesn't seem very simple to work with directly (unless I'm missing something).

epijim commented 2 years ago

PR made to close this issue with #19

epijim commented 2 years ago

Have only been reading the code, but seems the app also lacks an elegant way to interact with riskmetric results: image

https://github.com/pharmaR/risk_assessment/blob/735df24da335ace0a5dc71b408a62be945a84379/Modules/dbupload.R#L181

epijim commented 2 years ago

merged in with #19