[R-pkg-devel] Submission to CRAN when package needs personal data (API key)
Dirk Eddelbuettel
edd @ending from debi@n@org
Fri Sep 7 22:58:16 CEST 2018
On 7 September 2018 at 10:38, Hadley Wickham wrote:
| On Fri, Sep 7, 2018 at 9:13 AM Iñaki Ucar <iucar using fedoraproject.org> wrote:
| > El vie., 7 sept. 2018 a las 16:03, Ralf Stubner
| > (<ralf.stubner using daqana.com>) escribió:
| > > On 07.09.2018 15:52, Iñaki Ucar wrote:
| > > Tests in 'inst/test' got deprecated later on:
| > >
| > > https://github.com/r-lib/testthat/commit/0a7d27bb9ea545be7da1a10e511962928d888302
| >
| > Yeap, and I was pointing out the *old* (2011) practice and
| > recommendation. The reason why this evolved and changed, that I don't
| > know.
|
| Because CRAN specifically asked me to put testthat tests in tests/
| (R's standard testing directory), rather that somewhere non-standard.
But maybe that was in response to you having moved from inst/ to another
location, possibly a new top-level directory?
I have a hard time believing that CRAN considered a directory inside inst/ to
be non-standard. Current WRE where talking about tests/ only refers to the
basic test facility and neither RUnit nor testthat are mentioned (as other
CRAN package rarely get endorsed by WRE). I quote it in full below.
Dirk
Two-paragraph quote from Section 1.1.5 "Package subdirectories" follows.
Subdirectory 'tests' is for additional package-specific test code,
similar to the specific tests that come with the R distribution. Test
code can either be provided directly in a '.R' (or '.r' as from R 3.4.0)
file, or _via_ a '.Rin' file containing code which in turn creates the
corresponding '.R' file (e.g., by collecting all function objects in the
package and then calling them with the strangest arguments). The
results of running a '.R' file are written to a '.Rout' file. If there
is a corresponding(10) '.Rout.save' file, these two are compared, with
differences being reported but not causing an error. The directory
'tests' is copied to the check area, and the tests are run with the copy
as the working directory and with 'R_LIBS' set to ensure that the copy
of the package installed during testing will be found by
'library(PKG_NAME)'. Note that the package-specific tests are run in a
vanilla R session without setting the random-number seed, so tests which
use random numbers will need to set the seed to obtain reproducible
results (and it can be helpful to do so in all cases, to avoid
occasional failures when tests are run).
If directory 'tests' has a subdirectory 'Examples' containing a file
'PKG-Ex.Rout.save', this is compared to the output file for running the
examples when the latter are checked. Reference output should be
produced without having the '--timings' option set (and note that
'--as-cran' sets it).
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-package-devel
mailing list