[R-pkg-devel] CRAN packages dependency on bioconductor packages

Sebastian Meyer @eb@meyer @end|ng |rom |@u@de
Thu May 16 10:15:27 CEST 2024


Am 15.05.24 um 00:09 schrieb Lluís Revilla:
> Hi Junhui,
> 
> There is a separate log for checking if your package works without
> suggested packages: in the StepReg results
> The noSuggests title leads to:
> https://www.stats.ox.ac.uk/pub/bdr/noSuggests/StepReg.out
> Where you can see that it fails if a user don't have BiocStyle installed.
> I don't know if it is possible to use a vignette output conditionally with
> knitr: In any case it seems that it would be a requirement (Imports, or
> Depends).

Yes, I'd consider the package providing the vignette output format for 
the rmarkdown engine, here BiocStyle, as a strong dependency of that 
vignette. The error from the additional "noSuggests" check 
(<https://www.stats.ox.ac.uk/pub/bdr/noSuggests/README.txt>) shows it 
cannot be rebuild if BiocStyle is unavailable.

The 'StepReg' vignette could use a metadata line to declare strong 
vignette dependencies, for example:

     %\VignetteDepends{StepReg, BiocStyle, kableExtra}

(I haven't checked if this list is complete.)

This avoids spurious check errors in incomplete setups, such as when 
mass-checking packages (e.g., reverse dependencies) without some of the 
suggested packages being installed.

Best,

	Sebastian Meyer

> 
> However, it is best to not use the Bioconductor style for a package in
> CRAN.
> You could use the *_vignette or *_document format directly (from rmarkdown
> if I recall correctly).
> You will remove a dependency and avoid this problem entirely.
> 
> Best,
> 
> Lluís
> 
> 
> On Tue, 14 May 2024 at 22:48, Li, Junhui <Junhui.Li11 using umassmed.edu> wrote:
> 
>> Hi everyone,
>>
>> I recently developed an R package called 'StepReg' and used the
>> Bioconductor R package 'BiocStyle' in my vignettes, as shown below:
>>
>> output:
>>    BiocStyle::html_document:
>>      toc_float: true
>>    BiocStyle::pdf_document: default
>>
>> In my DESCRIPTION file, I added 'BiocStyle' to the Suggests field and
>> included a new line 'biocViews:', as follows:
>>
>> VignetteBuilder: knitr
>> biocViews:
>> Suggests:
>>      knitr,
>>      testthat,
>>      BiocStyle,
>>      kableExtra
>>
>> You may find all those information here:
>> https://github.com/JunhuiLi1017/StepReg/tree/dev
>>
>> There were no error messages when checking with 'R CMD check' and on
>> https://win-builder.r-project.org/upload.aspx. However, an error message
>> occurred when I attempted to upload it to CRAN:
>>
>> * checking re-building of vignette outputs ... ERROR
>> Error(s) in re-building vignettes:
>> --- re-building 'StepReg.Rmd' using rmarkdown
>> Error: processing vignette 'StepReg.Rmd' failed with diagnostics:
>> there is no package called 'BiocStyle'
>> --- failed re-building 'StepReg.Rmd'
>>
>> SUMMARY: processing the following file failed:
>>     'StepReg.Rmd'
>>
>> Error: Vignette re-building failed.
>> Execution halted
>>
>> For version 1.5.0 (
>> https://cran.r-project.org/web/packages/StepReg/index.html), I
>> successfully uploaded it to CRAN without including 'biocViews:' in the
>> DESCRIPTION file two months ago. However, I'm encountering difficulties
>> this time. Any insights or suggestions on resolving this issue would be
>> greatly appreciated.
>>
>> Thanks,
>> Junhui
>>
>>          [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list