Skip to content

Commit

Permalink
operators
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jun 6, 2024
1 parent 189e9e2 commit 9ae0d60
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 42 deletions.
2 changes: 1 addition & 1 deletion R/issues_descriptions.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ issues_descriptions <- function(meta) {
}

issues_descriptions_remotes <- function(meta) {
meta[["remotes"]] <- meta[["remotes"]] %|||% replicate(nrow(meta), NULL)
meta[["remotes"]] <- meta[["remotes"]] %||% replicate(nrow(meta), NULL)
meta$remotes <- lapply(meta$remotes, function(x) x[nzchar(x)])
meta[vapply(meta$remotes, length, integer(1L)) > 0L, ]
}
10 changes: 5 additions & 5 deletions R/record_issues.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#' an issue was first noticed. It automatically resets the next time
#' all package are resolved.
#' @return `NULL` (invisibly).
#' @inheritParams meta_checks
#' @inheritParams issues_checks
#' @inheritParams issues_versions
#' @inheritParams meta_checks
#' @param output Character of length 1, file path to the folder to record
#' new package issues. Each call to `record_issues()` overwrites the
#' contents of the repo.
Expand Down Expand Up @@ -60,9 +60,9 @@ record_issues <- function(
output = "issues",
mock = NULL
) {
today <- mock$today %|||% format(Sys.Date(), fmt = "yyyy-mm-dd")
checks <- mock$checks %|||% meta_checks(repo = repo)
packages <- mock$packages %|||% meta_packages(repo = repo)
today <- mock$today %||% format(Sys.Date(), fmt = "yyyy-mm-dd")
checks <- mock$checks %||% meta_checks(repo = repo)
packages <- mock$packages %||% meta_packages(repo = repo)
issues <- list() |>
add_issues(issues_checks(meta = checks), "checks") |>
add_issues(issues_descriptions(meta = packages), "descriptions") |>
Expand Down Expand Up @@ -107,7 +107,7 @@ overwrite_package_issues <- function(
dates
) {
path <- file.path(output, package)
issues[[package]]$date <- dates[[package]] %|||% today
issues[[package]]$date <- dates[[package]] %||% today
jsonlite::write_json(
x = issues[[package]],
path = file.path(output, package),
Expand Down
2 changes: 1 addition & 1 deletion R/record_versions.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#' @inheritSection record_issues Package issues
#' @return `NULL` (invisibly). Writes a package version manifest
#' and a manifest of version issues as JSON files.
#' @inheritParams meta_checks
#' @param versions Character of length 1, file path to a JSON manifest
#' tracking the history of released versions of packages.
#' The official versions file for R-multiverse is maintained and
#' updated periodically at
#' <https://github.com/r-multiverse/checks/blob/main/versions.json>.
#' @param repo Character string of package repositories to track.
#' @param current A data frame of current versions and hashes of packages
#' in `repo`. This argument is exposed for testing only.
#' @examples
Expand Down
4 changes: 2 additions & 2 deletions R/review_pull_request.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#' 4. Add a file in a forbidden place (close).
#' 5. Add a custom JSON file which can be parsed (manual review).
#' @return `NULL` (invisibly).
#' @param owner Character of length 1, name of the universe repository owner.
#' @param repo Character of length 1, name of the universe repository.
#' @inheritParams meta_checks
#' @param owner Character of length 1, name of the package repository owner.
#' @param number Positive integer of length 1, index of the pull request
#' in the repo.
review_pull_request <- function(
Expand Down
15 changes: 0 additions & 15 deletions R/utils_logic.R

This file was deleted.

3 changes: 2 additions & 1 deletion man/get_current_versions.Rd

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

3 changes: 2 additions & 1 deletion man/record_versions.Rd

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

5 changes: 3 additions & 2 deletions man/review_pull_request.Rd

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

5 changes: 3 additions & 2 deletions man/review_pull_requests.Rd

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

1 change: 0 additions & 1 deletion tests/testthat/test-issues_checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ test_that("issues_checks() on a small repo", {
meta <- meta_checks(repo = "https://wlandau.r-universe.dev")
issues <- issues_checks(meta = meta)
expect_true(is.list(issues))
expect_named(issues)
})
11 changes: 0 additions & 11 deletions tests/testthat/test-utils_logic.R

This file was deleted.

0 comments on commit 9ae0d60

Please sign in to comment.