From 858855e86b8a7b454bfcfff2ef26620dd5e0f0a5 Mon Sep 17 00:00:00 2001 From: Fan-iX <61686936+Fan-iX@users.noreply.github.com> Date: Wed, 19 Aug 2026 21:02:34 +0800 Subject: [PATCH 1/2] support `BIOCONDUCTOR_CONFIG_FILE` option for bioc config url --- R/bioc.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/bioc.R b/R/bioc.R index d84c351e..0573875f 100644 --- a/R/bioc.R +++ b/R/bioc.R @@ -95,7 +95,10 @@ bioconductor <- local({ config_url <- function() { Sys.getenv( "R_BIOC_CONFIG_URL", - "https://bioconductor.posit.co/config.yaml" + getOption( + "BIOCONDUCTOR_CONFIG_FILE", + "https://bioconductor.posit.co/config.yaml" + ) ) } From ceae4ec7171335d538398f186334093b6aa8a4c1 Mon Sep 17 00:00:00 2001 From: Fan-iX <61686936+Fan-iX@users.noreply.github.com> Date: Wed, 19 Aug 2026 21:13:15 +0800 Subject: [PATCH 2/2] update tests for `BIOCONDUCTOR_CONFIG_FILE` option --- tests/testthat/helper-apps.R | 1 + tests/testthat/test-bioc.R | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/testthat/helper-apps.R b/tests/testthat/helper-apps.R index 7cc1a4f9..4beb4795 100644 --- a/tests/testthat/helper-apps.R +++ b/tests/testthat/helper-apps.R @@ -55,6 +55,7 @@ setup_fake_apps <- function(.local_envir = parent.frame()) { withr::local_options( repos = c(CRAN = fake_cran$url()), pkg.cran_metadata_url = fake_cran$url(), + BIOCONDUCTOR_CONFIG_FILE = paste0(fake_bioc$url(), "/config.yaml"), .local_envir = .local_envir ) withr::local_envvar( diff --git a/tests/testthat/test-bioc.R b/tests/testthat/test-bioc.R index 81b75403..6edadf31 100644 --- a/tests/testthat/test-bioc.R +++ b/tests/testthat/test-bioc.R @@ -49,10 +49,10 @@ test_that("get_matching_bioc_version errors helpfully on download failure", { app <- webfakes::new_app() app$get("/config.yaml", function(req, res) res$send("")) proc <- webfakes::local_app_process(app) - withr::local_envvar( - R_BIOC_CONFIG_URL = paste0(proc$url(), "/config.yaml"), - R_BIOC_VERSION = NA_character_ + withr::local_options( + BIOCONDUCTOR_CONFIG_FILE = paste0(proc$url(), "/config.yaml") ) + withr::local_envvar(R_BIOC_VERSION = NA_character_) gmbv <- bioconductor$.internal$get_matching_bioc_version fake(gmbv, "getRversion", function() package_version("1.0.0"))