riskassessment icon indicating copy to clipboard operation
riskassessment copied to clipboard

Documentation metric is always "Not Found"

Open AARON-CLARK opened this issue 2 years ago • 2 comments

the riskmetric assessment in question is called 'export_help', which is supposed to measure the percent of exported objects that have documentation attached to them:

image

Running the code below...

library(dplyr)
pkg_name <- "roxygen2"
ref <- riskmetric::pkg_ref(pkg_name,
                    source = "pkg_cran_remote",
                    repos = c("https://cran.rstudio.com")) %>%
  dplyr::as_tibble()

assessed <- ref %>%
  riskmetric::pkg_assess() 

assessed %>%
  select(export_help) 

image

AARON-CLARK avatar Feb 20 '23 15:02 AARON-CLARK

This is due to the metric not being defined for pkg_ref(..., source = "pkg_cran_remote") objects (see here).

Addressing this will need to wait until we have a mechanism to assess packages with source = "pkg_install". I have been toying with that on #430 as it will aid in this and other issues. Still some technical kinks to work out and some UI/UX questions (e.g. do we expect users to sit and wait while a package is installed -- potentially including building compiled code -- just to insert the package to the DB). That PR is mostly a proof of concept on how the package installation and riskmetric execution components could look.

borgmaan avatar Feb 22 '23 16:02 borgmaan

FYI, de-prioritizing this one since riskmetric is going to be working on a more holistic approach to populating each metric/assessment with info. See...

https://github.com/pharmaR/riskmetric/issues/299

AARON-CLARK avatar Jul 10 '23 14:07 AARON-CLARK