athchen / beer

Bayesian enrichment estimation in R
Other
9 stars 1 forks source link

Add 'codetools' to Suggests: #1

Closed HenrikBengtsson closed 2 years ago

HenrikBengtsson commented 2 years ago

Hi, when running reverse dependency package checks on progressr, I noticed that your package is not declaring codetools as a package dependency, which is needed in your calls to BiocParallel. When running R CMD check --as-cran without package codetools installed, one gets:

Running examples in ‘beer-Ex.R’ failed
The error most likely occurred in:

> ### Name: brew
> ### Title: Bayesian Enrichment Estimation in R (BEER)
> ### Aliases: brew
> 
> ### ** Examples
> 
> sim_data <- readRDS(system.file("extdata", "sim_data.rds", package = "beer"))
...
colData names(7): group n_init ... c pi
beads-only name(4): beads> 
> ## Snow
> brew(sim_data, BPPARAM = BiocParallel::SnowParam())

── Running JAGS ────────────────────────────────────────────────────────────────
Sample runs
Error in loadNamespace(x) : there is no package called ‘codetools’
Calls: brew ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

and

  Running ‘spelling.R’
  Running ‘testthat.R’
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 50 lines of output:
    8. │       ├─BiocParallel::bploop(...)
    9. │       └─BiocParallel:::bploop.lapply(...)
   10. │         └─BiocParallel:::.bploop_impl(...)
   11. │           └─BiocParallel:::.findVariables(FUN)
   12. └─base::loadNamespace(x)
...
    9. │       └─BiocParallel:::.bploop_impl(...)
   10. │         └─BiocParallel:::.findVariables(FUN)
   11. └─base::loadNamespace(x)
   12.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   13.     └─base withOneRestart(expr, restarts[[1L]])
   14.       └─base doWithOneRestart(return(expr), restart)

  [ FAIL 3 | WARN 0 | SKIP 1 | PASS 54 ]
  Error: Test failures
  Execution halted

Source: https://github.com/HenrikBengtsson/progressr/blob/ee885403a09ba0cc304812ebc9161bc8e364743b/revdep/problems.md#beer

athchen commented 2 years ago

Thanks for the suggestion! I'm not sure if this is still a problem given the update in https://github.com/Bioconductor/BiocParallel/issues/212, but just in case, I've added codetools to Suggests in 4378cb990e0d3606a8a4b2fecbed708a3fd17a8b.

HenrikBengtsson commented 2 years ago

Thanks for the suggestion! I'm not sure if this is still a problem given the update in Bioconductor/BiocParallel#212, but just in case, I've added codetools to Suggests in 4378cb9.

Thanks. Yes, correct, when the updated BiocParallel is online, you no longer need it.

However, if you have the spare cycles, it would be great, but not critical, if you could push this fix to the Bioc release branch.

HenrikBengtsson commented 2 years ago

Never mind, they've updated BiocParallel to import codetools on both the Bioc devel and the Bioc release, so you're all good without doing anything on your end.

athchen commented 2 years ago

Oh great! Thanks for keeping me updated.