Re: [Rd] Package development process?

From: Hadley Wickham <hadley_at_rice.edu>
Date: Wed, 16 Jun 2010 09:53:19 -0500

>      What about the encouragement to add unit tests, if only disguised as
> examples?

Examples are not unit tests. Examples are a convenient way of testing some aspects of the package, but serve a rather different purpose to tests. The R community does not emphase testing nearly as much as other communities. For example, Ruby has a very strong testing culture including at least 10 different unit testing frameworks.

>      I've found the unit tests to be a powerful tool to help improve and
> maintain the quality of packages to which I contribute.  To this end, Sundar
> and I added a column "Autochecks" to the table of "Selected Repositories" in
> the Wikipedia article on "Software repository"
> (http://en.wikipedia.org/wiki/Software_repository), and we describe it
> briefly in the text introducing that table.

Unfortunately your description highlights a inadequacy of R and poor software development procedures on the part of many R package developers (including me!). For exactly the reason you discuss, it's never a good idea for your package to depend on the most current version of another package. If you do, changes to that package might break yours. Most other package management systems allow you to specify the version of a dependency so that this doesn't happen. You can do this with R, but because it's hard to have multiple versions of the same package installed at the same time, it's not as useful.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 16 Jun 2010 - 14:56:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Jun 2010 - 12:01:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive