From fb3365119868fb62d4401a625b49386dde9c1652 Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Fri, 17 Jul 2026 10:19:09 -0400 Subject: [PATCH] Preserve non-software package rows in biocBuildReport() biocBuildReport() requests all four package types by default, but merge(y, depdf, by.x = "pkg", by.y = "Package") used base R's default inner join. get_deprecated_status_df() only pulls the software VIEWS, so depdf only lists software package names -- the inner join silently dropped every workflows/data-experiment/data-annotation row before the final report was returned. problemPage() and checkMe()/checkDeps() sit on top of biocBuildReport(), so this made it impossible for them to ever surface a failing workflow package. Switch to all.x = TRUE so non-software packages are kept (with NA Deprecated/PackageStatus, since that status isn't tracked outside the software VIEWS). Fixes #21 --- R/biocBuildReport.R | 2 +- tests/testthat/test_biocBuildReport.R | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/R/biocBuildReport.R b/R/biocBuildReport.R index 58acbc8..6e6ee9b 100644 --- a/R/biocBuildReport.R +++ b/R/biocBuildReport.R @@ -141,7 +141,7 @@ biocBuildReport <- function( vapply(depdf, function(x) identical(length(x), 0L), logical(1L)) ) if (!isEmpty) - y <- merge(y, depdf, by.x = "pkg", by.y = "Package") + y <- merge(y, depdf, by.x = "pkg", by.y = "Package", all.x = TRUE) df <- suppressMessages(left_join(y, z)) # just suppress "Joining by...." df <- as_tibble(df) diff --git a/tests/testthat/test_biocBuildReport.R b/tests/testthat/test_biocBuildReport.R index 4e41812..153d0a9 100644 --- a/tests/testthat/test_biocBuildReport.R +++ b/tests/testthat/test_biocBuildReport.R @@ -21,3 +21,17 @@ test_that("columns are consistent in report output", { expect_true(tibble::is_tibble(bioc3.14_build)) }) +test_that("non-software package types are not dropped (#21)", { + full_build <- biocBuildReport( + "devel", + pkgType = c( + "software", "data-experiment", "data-annotation", "workflows" + ) + ) + reported_types <- unique(full_build[["pkgType"]]) + expect_true(all( + c("data-annotation", "data-experiment", "workflows") %in% + reported_types + )) +}) +