diff --git a/.gitignore b/.gitignore index f532a99d..ab696e18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,11 @@ .DS_Store - vignettes !vignettes/*.Rmd - inst/doc docs - .Rproj.user .Rhistory .RData .Ruserdata .html +riskmetric.Rproj diff --git a/DESCRIPTION b/DESCRIPTION index a409c187..947ae34a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Type: Package Title: Risk Metrics to Evaluating R Packages Description: Facilities for assessing R packages against a number of metrics to help quantify their robustness. -Version: 0.2.0 +Version: 0.2.1 Authors@R: c( person("R Validation Hub", role = c("aut"), email = "psi.aims.r.validation@gmail.com"), person("Doug", "Kelkhoff", role = c("aut"), email = "doug.kelkhoff@gmail.com"), diff --git a/NEWS.md b/NEWS.md index 4c038d22..ff0eea0e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# riskmetric 0.2.1 + +- Updates for S3 Method consistancy for `vec_cast` and `pillar_shift` per CRAN +comments. + # riskmetric 0.2.0 - We now have a Hex Logo! #233. Thanks to @AARON-CLARK. diff --git a/R/pkg_metric_error.R b/R/pkg_metric_error.R index 18a841b0..d7c8f661 100644 --- a/R/pkg_metric_error.R +++ b/R/pkg_metric_error.R @@ -87,7 +87,7 @@ format_assessment_message <- function(e, name, assessment) { #' @importFrom pillar pillar_shaft new_pillar_shaft_simple style_na #' @method pillar_shaft pkg_metric_error #' @export -pillar_shaft.pkg_metric_error <- function(x) { +pillar_shaft.pkg_metric_error <- function(x, ...) { pillar::new_pillar_shaft_simple(pillar::style_na(paste0( "<", gsub("pkg_metric_", "", class(x)[[1]]), diff --git a/R/pkg_ref_class_format.R b/R/pkg_ref_class_format.R index 5f3ee8c9..50ab1651 100644 --- a/R/pkg_ref_class_format.R +++ b/R/pkg_ref_class_format.R @@ -51,7 +51,7 @@ vec_ptype_abbr.pkg_ref <- function(x, ...) { #' @importFrom vctrs vec_cast.character #' @method vec_cast.character list_of_pkg_ref #' @export -vec_cast.character.list_of_pkg_ref <- function(x, to) { +vec_cast.character.list_of_pkg_ref <- function(x, to, ...) { vapply(x, "[[", character(1L), "name") } diff --git a/R/vctrs_list_of_pkg_metric.R b/R/vctrs_list_of_pkg_metric.R index 42550d18..67d6b774 100644 --- a/R/vctrs_list_of_pkg_metric.R +++ b/R/vctrs_list_of_pkg_metric.R @@ -22,7 +22,7 @@ pillar_shaft.list_of_pkg_metric <- function(x, ...) { #' @importFrom vctrs vec_cast.double #' @method vec_cast.double list_of_pkg_metric #' @export -vec_cast.double.list_of_pkg_metric <- function(x, to) { +vec_cast.double.list_of_pkg_metric <- function(x, to, ...) { out <- vector("numeric", length(x)) is_error <- vapply(x, inherits, logical(1L), "pkg_metric_error") out[is_error] <- NA_real_