Should demo files be run as part of R CMD check?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Should demo files be run as part of R CMD check?

hadley wickham
I was a bit suprised to note that demo files are not run as part of R
CMD check.  This seems out of keeping with the philosophy of running
all code contained in the package (in the source, in examples etc).

Should demo files be checked as part of R CMD check?

Hadley

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Should demo files be run as part of R CMD check?

Thomas Lumley
On Fri, 7 Apr 2006, hadley wickham wrote:

> I was a bit suprised to note that demo files are not run as part of R
> CMD check.  This seems out of keeping with the philosophy of running
> all code contained in the package (in the source, in examples etc).
>
> Should demo files be checked as part of R CMD check?
>


The rationale may be that a demo is entitled to assume it is being run
interactively.  Checking demo(tkdensity), for example, would be
unproductive.


  -thomas

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Should demo files be run as part of R CMD check?

Gabor Grothendieck
In reply to this post by hadley wickham
I didn't realize this either but it might be useful in situations
where the package depends on other software which might
not be on CRAN.

On 4/7/06, hadley wickham <[hidden email]> wrote:

> I was a bit suprised to note that demo files are not run as part of R
> CMD check.  This seems out of keeping with the philosophy of running
> all code contained in the package (in the source, in examples etc).
>
> Should demo files be checked as part of R CMD check?
>
> Hadley
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Should demo files be run as part of R CMD check?

Brian Ripley
In reply to this post by Thomas Lumley
On Fri, 7 Apr 2006, Thomas Lumley wrote:

> On Fri, 7 Apr 2006, hadley wickham wrote:
>
>> I was a bit suprised to note that demo files are not run as part of R
>> CMD check.  This seems out of keeping with the philosophy of running
>> all code contained in the package (in the source, in examples etc).
>>
>> Should demo files be checked as part of R CMD check?
>>
>
>
> The rationale may be that a demo is entitled to assume it is being run
> interactively.  Checking demo(tkdensity), for example, would be
> unproductive.

Also, it is easy for a package author to arrange to check the demos by a
test in the package's tests directory.

The non-interactive demos in the R tarball are checked via 'make
check-devel'.  Had we been starting for now, we would use the 'tests'
mechanism, but on Unix-alikes the standard packages are installed and
checked in different ways from contributed ones.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Should demo files be run as part of R CMD check?

hadley wickham
> > The rationale may be that a demo is entitled to assume it is being run
> > interactively.  Checking demo(tkdensity), for example, would be
> > unproductive.
>
> Also, it is easy for a package author to arrange to check the demos by a
> test in the package's tests directory.

Thanks for your comments - I hadn't considered the case of interactive
demos, and as you say it is easy enough to add these checks by using a
test in the tests directory.    Would it be helpful to provide a short
note to this effect in writing R extensions?  I would be happy to
provide a diff against the latest source.

Hadley

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel