From 6ed1ee0ee3e461e57a28bc348d95614b0d0ee625 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Tue, 28 May 2024 11:23:04 +0100 Subject: [PATCH] aligns with R-Multiverse infrastructure --- DESCRIPTION | 5 ++--- NAMESPACE | 3 --- NEWS.md | 6 +++++- R/check_versions.R | 22 +++++++++++++--------- R/utils_package.R | 8 -------- README.Rmd | 2 +- README.md | 2 +- 7 files changed, 22 insertions(+), 26 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8a3eb7f..464c773 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Title: Tools for Contributing Packages to R-multiverse Description: 'R-multiverse' is a community-curated collection of R package releases, powered by 'R-universe'. The 'multitools' package has tools for maintainers of packages in 'R-multiverse'. -Version: 0.1.0 +Version: 0.1.1 License: MIT + file LICENSE URL: https://r-multiverse.org/multitools/, @@ -41,8 +41,7 @@ Depends: R (>= 4.0.0) Imports: jsonlite, - tibble, - utils + tibble Suggests: curl, knitr (>= 1.30), diff --git a/NAMESPACE b/NAMESPACE index a0e2050..668e024 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,6 +4,3 @@ export(check_versions) importFrom(jsonlite,read_json) importFrom(tibble,as_tibble) importFrom(tibble,tibble) -importFrom(utils,browseURL) -importFrom(utils,globalVariables) -importFrom(utils,install.packages) diff --git a/NEWS.md b/NEWS.md index edc1eca..0f7d38a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ -# multitools 0.5.0 +# multitools 0.1.1 + +* Aligns with R-Multiverse infrastructure. + +# multitools 0.1.0 * Rename package. diff --git a/R/check_versions.R b/R/check_versions.R index d26f935..6612833 100644 --- a/R/check_versions.R +++ b/R/check_versions.R @@ -26,25 +26,29 @@ check_versions <- function() { manifest <- file.path( "https://raw.githubusercontent.com", "r-multiverse", - "r-multiverse.r-universe.dev", + "checks", "main", - "version_issues.json" + "versions.json" ) out <- jsonlite::read_json( path = manifest, simplifyVector = TRUE, simplifyDataFrame = TRUE ) - out <- tibble::as_tibble(out) if (nrow(out) < 1L) { - out <- tibble::tibble( - package = character(0L), - version_current = character(0L), - version_highest = character(0L), - hash_current = character(0L), - hash_highest = character(0L) + return( + tibble::tibble( + package = character(0L), + version_current = character(0L), + version_highest = character(0L), + hash_current = character(0L), + hash_highest = character(0L) + ) ) } + out <- out[out[["version_current"]] != out[["version_highest"]] | + out[["hash_current"]] != out[["hash_highest"]], ] + out <- tibble::as_tibble(out) order <- c( "package", "version_current", diff --git a/R/utils_package.R b/R/utils_package.R index 34dce01..a059de8 100644 --- a/R/utils_package.R +++ b/R/utils_package.R @@ -6,12 +6,4 @@ #' @family help #' @importFrom jsonlite read_json #' @importFrom tibble as_tibble tibble -#' @importFrom utils browseURL install.packages globalVariables NULL - -utils::globalVariables( - c( - "." - ), - package = "multitools" -) diff --git a/README.Rmd b/README.Rmd index 7341f4f..9ff459a 100644 --- a/README.Rmd +++ b/README.Rmd @@ -73,7 +73,7 @@ To fix the version number of an R-multiverse package that you maintain, create a # Citation ```{r, eval = FALSE, warning = FALSE, comment = ""} -o cite package ‘multitools’ in publications use: +To cite package ‘multitools’ in publications use: Landau WM, Gao C, Revilla Sancho L (2024). _multitools: Tools for Contributing Packages to R-multiverse_. R package version 0.1.0, https://github.com/r-multiverse/multitools, diff --git a/README.md b/README.md index afee54b..df0c503 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ column in the output of `check_versions()`. # Citation ``` r -o cite package ‘multitools’ in publications use: +To cite package ‘multitools’ in publications use: Landau WM, Gao C, Revilla Sancho L (2024). _multitools: Tools for Contributing Packages to R-multiverse_. R package version 0.1.0, https://github.com/r-multiverse/multitools,