Skip to content

Commit

Permalink
Merge pull request #325 from pharmaR/324_riskmetric_0.2.4
Browse files Browse the repository at this point in the history
Updates with CRAN fixes
  • Loading branch information
emilliman5 committed Jan 24, 2024
2 parents 3905c66 + c28699c commit 9e42e48
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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.3
Version: 0.2.4
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"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# riskmetric 0.2.4

- Fix CRAN errors.

# riskmetric 0.2.3

- Fix issue with CRAN package documentation flags. (#311)
Expand Down
1 change: 0 additions & 1 deletion R/pkg_metric_na.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#' @param x a \code{pkg_metric} object to wrap in a \code{pkg_metric_na}
#' subclass
#' @param message an optional message explaining why a metric is not applicable.
#' @param a \code{pkg_metric} object after wrap in a \code{pkg_metric_na}
#' @return a \code{pkg_metric} object after wrap in a \code{pkg_metric_na}
#' @keywords internal
as_pkg_metric_na <- function(x, message = NULL) {
Expand Down
6 changes: 2 additions & 4 deletions R/pkg_ref_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
#'
#' \itemize{
#' \item{\strong{\code{pkg_ref}}}{ A default class for general metadata
#' collection.
#' collection.}
#' \itemize{
#' \item{\strong{\code{pkg_source}}}{ A reference to a source code directory.}
#' \item{\strong{\code{pkg_install}}}{ A reference to a package installation
#' location in a package library. A specific library can be passed by passing
#' the path to the library as the parameter `lib.loc`}
#' \item{\strong{\code{pkg_remote}}}{ A reference to package metadata on a
#' remote server.
#' remote server.}
#' \itemize{
#' \item{\strong{\code{pkg_cran_remote}}}{ A reference to package
#' information pulled from the CRAN repository.}
Expand All @@ -42,8 +42,6 @@
#' }
#' }
#' }
#' }
#' }
#'
#' @section Package Cohorts:
#'
Expand Down
5 changes: 2 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## riskmetric 0.2.2
## riskmetric 0.2.4

- Bug fixes
- Fixes issue with S3 method consistency.
Resolved issues with CRAN checks.

Tested on Ubuntu Jammy, GitHub Action, and RHub.

Expand Down
2 changes: 0 additions & 2 deletions man/as_pkg_metric_na.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions man/pkg_assess.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions man/pkg_ref.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions tests/testthat/setup_test_packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
# evaluation process. Errors are better tested in metric-specific unit tests.

# create a temporary library for installed test packages
options(repos = "fake-cran.fake-r-project.org")
templib <- tempfile("riskmetric_test_lib_")
oldLibs <- .libPaths()
dir.create(templib)

withr::with_libpaths(templib, {
withr::with_libpaths(c(templib, oldLibs), {
devtools::install(
file.path(test_path(), "test_packages", "pkgsourcegood"),
quiet = TRUE,
Expand Down Expand Up @@ -60,14 +62,14 @@ score_stdlibs_install <- pkg_score(
error_handler = score_error_zero)

# a representative "good" quality package available on CRAN, but not installed
pkg_ref_cran_remote_good <- pkg_cran("pkgcranremotegood")
pkg_ref_cran_remote_good <- pkg_cran("pkgcranremotegood", repos = "fake-cran.fake-r-project.org")
assess_cran_remote_good <- pkg_assess(pkg_ref_cran_remote_good)
score_cran_remote_good <- pkg_score(
assess_cran_remote_good,
error_handler = score_error_zero)

# a representative "bad" quality package available on CRAN, but not installed
pkg_ref_cran_remote_bad <- pkg_cran("pkgcranremotebad")
pkg_ref_cran_remote_bad <- pkg_cran("pkgcranremotebad", repos = "fake-cran.fake-r-project.org")
assess_cran_remote_bad <- pkg_assess(pkg_ref_cran_remote_bad)
score_cran_remote_bad <- pkg_score(
assess_cran_remote_bad,
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_pkg_ref.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
options(repos = "fake-cran.fake-r-project.org")

test_that("get_pkg_ref_classes appropriately captures full class chain", {
skip_on_cran()

Expand Down

0 comments on commit 9e42e48

Please sign in to comment.