[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: autodep8 for R packages?



Hi,

On Wed, Mar 30, 2016 at 09:42:48PM -0500, Dirk Eddelbuettel wrote:
> On 30 March 2016 at 23:16, Gordon Ball wrote:
> | For the set of R packages I recently uploaded, I added trivial DEP-8
> | tests* which did:
> | 
> |     R -e "if (! require('$pkg')) quit(status=1)"
> 
> require() is deprecated. Use
> 
>     requireNamespace("$pkg", quietly=TRUE)
> 
> which also returns a boolean.   Or simply
> 
>     library("$pkg")
> 
> which either dies, or proceeds in which case you can follow with q(status=1).

I confirm that automatically creating tests makes sense but I think
creating these simple ones is not that helpful since most R packages I
dealt with recently are featuring more sophisticated tests using the
available test suites in R.
 
> | Which I think is sufficient to trivially test whether a package has been
> | properly installed with required dependencies and hence can be loaded by R.
> | 
> | Would it be useful to try and get a rule to do this automatically into
> | autodep8 (suggested by Mattia who sponsored my original uploads), and
> | hence provide a minimal autopkgtest for all R packages? (Are there any
> | corner cases in which this wouldn't work?)
> 
> Not sure.
>     Pro: Additional test.
>     Con: Test is already done at package build time (ie R itself does this)

The "Con" part is no con at all.  Running a test at build time is a
different thing than autopkgtest.  Please read the docs.

Kind regards

         Andreas.

-- 
http://fam-tille.de


Reply to: