Skip to content

Instantly share code, notes, and snippets.

@mtmorgan
Created June 9, 2020 07:18
Show Gist options
  • Save mtmorgan/21e18991c6ebdb388e8828bcc0fe72f6 to your computer and use it in GitHub Desktop.
Save mtmorgan/21e18991c6ebdb388e8828bcc0fe72f6 to your computer and use it in GitHub Desktop.
Query Bioconductor build report for package dependencies that fail to install, build, or check
library(BiocPkgTools)
library(dplyr)
deps_broken <-
function(
pkg,
repos = BiocManager::repositories(),
version = BiocManager::version()
)
{
rpt <- BiocPkgTools::biocBuildReport(as.character(version))
## master builder
malbec <-
rpt %>%
filter(startsWith(node, "malbec")) %>%
select(pkg, stage, result) %>%
tidyr::pivot_wider(names_from = "stage", values_from="result")
## failing packages
flag <- c("ERROR", "TIMEOUT")
fail <-
malbec %>%
filter(install %in% flag | buildsrc %in% flag | checksrc %in% flag)
## package dependencies...
db <- available.packages(repos = repos)
deps0 <- tools::package_dependencies(pkg, db, recursive = TRUE)
deps <- tibble(
pkg = factor(rep(names(deps0), lengths(deps0)), levels = names(deps0)),
dep = unlist(unname(deps0))
)
## ...failing
deps %>%
left_join(fail, by = c(dep = "pkg")) %>%
filter(install == "OK", buildsrc %in% flag | checksrc %in% flag)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment