[Bioc-devel] BiocCheck warnings and errors

Hervé Pagès hp@ge@@on@g|thub @end|ng |rom gm@||@com
Tue Sep 13 23:12:57 CEST 2022


On 13/09/2022 14:06, Hervé Pagès wrote:

> On 13/09/2022 13:20, Christian Arnold wrote:
>
>> Didnt the behavior of \donttest change with R 4.0 so that |R CMD check
>> --as-cran|now runs|\donttest|examples (see
>> https://community.rstudio.com/t/r-cmd-check-r-4-0-0-now-runs-donttest-how-to-proceed-with-long-running-examples/64493)? 
>>
>
> That's in the context of 'R CMD check --as-cran', which we don't use. 
> AFAIK a bare 'R CMD check' still doesn't run the code in \donttest.
>
>> Not sure whether \donttest or \dontrun is better in a Bioc context.
>
> \donttest should be preferred over \dontrun. The latter should be used 
> only for code that is not meant to be run, ever. It doesn't even need 
> to be valid code e.g. it could be some pseudo-code that the user would 
> need to slightly edit before it works for them. OTOH the former must 
> contain valid R code, and that code will be executed when the user 
> tries to run the examples in the man page with 'example(<som-alias>)'.

And of course both of them should be avoided at all cost ;-) Use only as 
a last resort!

H.

-- 
Hervé Pagès

Bioconductor Core Team
hpages.on.github using gmail.com



More information about the Bioc-devel mailing list