Skip to content
Prev 11429 / 12125 Next

[R-pkg-devel] cran check about examples time

? Mon, 14 Apr 2025 08:53:38 +0200
Emanuele Cordano <emanuele.cordano at gmail.com> ?????:
Nowadays, R CMD check --as-cran does run \donttest{} examples. (But not
without --as-cran or --run-donttest, and no automatic checks enable
--run-dontrun.)
It looks like most of the time was spent waiting to establish a new
connection (closer to 8 seconds on my computer). What does
system.time(example(get.geotop.inpts.keyword.value)) return for you? Is
it an option to download less files in the example?

Having examples that download data from the internet is somewhat
precarious for a CRAN package. One way to prevent intermittent
connectivity problems from failing your package checks is to make sure
that any time your package fails to download something from the Web, it
calls stop() with a classed error object (e.g. simpleError(...) with an
additional class "geotop_internet_error" attached). This makes it
possible to wrap your examples in tryCatch(..., geotop_internet_error =
function(e) { ... }), so that any connection errors do not cause your
examples to fail, but other errors are not swallowed.