Skip to contents

Record R-multiverse package issues in package-specific JSON files.

Usage

record_issues(
  repo = "https://community.r-multiverse.org",
  versions = "versions.json",
  output = "issues",
  mock = NULL,
  verbose = FALSE
)

Arguments

repo

Character of length 1, URL of the package repository. R-multiverse uses "https://community.r-multiverse.org".

versions

Character of length 1, file path to a JSON manifest tracking the history of released versions of packages.

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.

mock

For testing purposes only, a named list of data frames for inputs to various intermediate functions.

verbose

TRUE to print progress while checking issues with dependencies, FALSE otherwise.

Value

NULL (invisibly).

Package issues

Functions like issues_versions() and issues_descriptions() perform health checks for all packages in R-multiverse. For a complete list of checks, see the issues_*() functions listed at https://r-multiverse.org/multiverse.internals/reference/index.html. record_versions() updates the version number history of releases in R-multiverse, and record_issues() gathers together all the issues about R-multiverse packages.

Issue files

For each package with observed problems, record_issues() writes an issue file. This issue file is a JSON list with one element per type of failing check. Each element has an informative name (for example, checks, descriptions, or versions) and a list of diagnostic information.

Each issue file also has a date field. This date the day that an issue was first noticed. It automatically resets the next time all package are resolved.

Examples

  repo <- "https://wlandau.r-universe.dev"
  output <- tempfile()
  versions <- tempfile()
  record_versions(
    versions = versions,
    repo = repo
  )
  record_issues(
    repo = repo,
    versions = versions,
    output = output
  )
  files <- list.files(output)
  print(files)
#> [1] "crew.aws.batch" "crew.cluster"  
  package <- head(files, n = 1)
  if (length(package)) {
    print(package)
  }
#> [1] "crew.aws.batch"
  if (length(package)) {
    print(readLines(file.path(output, package)))
  }
#> [1] "{"                                                                
#> [2] "  \"descriptions\": {"                                            
#> [3] "    \"remotes\": [\"wlandau/crew\"]"                              
#> [4] "  },"                                                             
#> [5] "  \"date\": [\"2024-11-16\"],"                                    
#> [6] "  \"version\": [\"0.0.7\"],"                                      
#> [7] "  \"remote_hash\": [\"fc331371bc8c3f7722229849d77be0a031f34bdd\"]"
#> [8] "}"