Hi, it looks like xml2 needs to be added to Suggests, or alternatively test conditionally on requireNamespace("xml2"). I spotted this while running revdep checks on my matrixStats package. Here is what I get:
* using log directory ‘/c4/home/henrik/repositories/matrixStats/revdep/checks/Gviz/new/Gviz.Rcheck’
* using R version 4.1.0 (2021-05-18)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘Gviz/DESCRIPTION’ ... OK
* this is package ‘Gviz’ version ‘1.36.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘Gviz’ can be installed ... OK
* checking installed package size ... NOTE
installed size is 10.3Mb
sub-directories of 1Mb or more:
R 1.7Mb
doc 4.7Mb
extdata 2.5Mb
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Last 50 lines of output:
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
I, expand.grid, unname
Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: grid
>
> test_check("Gviz")
Loading required package: BSgenome
Loading required package: Biostrings
Loading required package: XVector
Attaching package: 'Biostrings'
The following object is masked from 'package:grid':
pattern
The following object is masked from 'package:base':
strsplit
Loading required package: rtracklayer
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test_AllClasses.R:168:5): interaction with biomart works ─────────────
Error: Please install xml2 package
Backtrace:
█
1. └─Gviz::BiomartGeneRegionTrack(...) test_AllClasses.R:168:4
2. └─methods::new(...)
3. ├─methods::initialize(value, ...)
4. └─Gviz::initialize(value, ...)
5. └─Gviz:::.local(.Object, ...)
6. └─Gviz:::.cacheMartData(.Object, chromosome, staged)
7. └─Gviz:::.fetchBMData(bmtrack, chromosome, staged)
8. └─biomaRt::getBM(...)
9. └─biomaRt:::.createHash(...)
10. └─biomaRt::listEnsemblArchives()
11. └─biomaRt:::.listEnsemblArchives(https = https, httr_config = list())
12. ├─XML::htmlParse(content(html))
13. └─httr::content(html)
14. └─httr:::parse_auto(raw, type, encoding, ...)
15. └─httr:::parser(...)
16. └─httr:::need_package("xml2")
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 293 ]
Error: Test failures
Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... NONE
‘Gviz.Rmd’ using ‘UTF-8’... OK
* checking re-building of vignette outputs ... SKIPPED
* DONE
Status: 1 ERROR, 1 NOTE
Hi, it looks like xml2 needs to be added to Suggests, or alternatively test conditionally on
requireNamespace("xml2")
. I spotted this while running revdep checks on my matrixStats package. Here is what I get: