[Lme4-commits] r1811 - pkgtests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 24 23:00:48 CEST 2013


Author: bbolker
Date: 2013-04-24 23:00:48 +0200 (Wed, 24 Apr 2013)
New Revision: 1811

Modified:
   pkgtests/README
   pkgtests/lme4deptests.R
   pkgtests/runtests
Log:
in progress



Modified: pkgtests/README
===================================================================
--- pkgtests/README	2013-04-17 21:09:55 UTC (rev 1810)
+++ pkgtests/README	2013-04-24 21:00:48 UTC (rev 1811)
@@ -1,12 +1,23 @@
-directory with tools for checking downstream packages (of lme4,
-but could in principle be something else??)
+This directory contains tools for checking downstream packages (of lme4, but could in principle be something else??)
 
 * set up all needed packages in a local ./library directory
-
 * in order to check packages, we need a _tarball_ of the focal package
-_and_ we need all of its dependencies and suggests to be installed locally;
-we're going to do this by setting up a local ./library that can hold
-all that junk so we don't end up installing 75% of CRAN in our own
-local libraries ...
+_and_ we need all of its dependencies and suggests to be installed locally; we do this by setting up a local ./library that can hold all that junk so we don't end up installing 75% of CRAN in our own
+local libraries ... and so that in principle it can be kept clean
+* need new code to handle 'package required and available but unsuitable version'
+* should consider updating to use the built-in R package management/comparison tools
 
-* need new code to handle 'package required and available but unsuitable version'
\ No newline at end of file
+* only two .R files:
+ * lme4depfuns.R: utility functions
+ * lme4deptests.R: driver code
+
+* 'runtests' is a shell script with environment variable-setting commands that _must_ be run prior to testing (esp. setting up ~/.R/check.Renviron file properly); it seems necessary to set R_LIBS_SITE explicitly as well as within ~/.R/check.Renviron, but haven't tested this thoroughly, nor do I really understand what's going on.
+
+* the process:
+
+TO DO / FIXME:
+* getting warnings about
+  Warning in normalizePath(c(new, .Library.site, .Library), "/") :
+     path[4]="./library": No such file or directory
+
+not quite sure where this is coming from, whether it matters, and how to fix it

Modified: pkgtests/lme4deptests.R
===================================================================
--- pkgtests/lme4deptests.R	2013-04-17 21:09:55 UTC (rev 1810)
+++ pkgtests/lme4deptests.R	2013-04-24 21:00:48 UTC (rev 1811)
@@ -3,6 +3,13 @@
 ## include all downstream packages from CRAN, r-forge:
 ## packages to check, loaded from package-dependency scan
 
+## these should eventually be default arguments
+verbose <- TRUE
+## need this because R can't handle '@CRAN@' magic default
+## in non-interactive mode ...
+options(repos=c(CRAN="http://probability.ca/cran"))
+
+if (verbose) cat("retrieving dependency information\n")
 source("http://developer.r-project.org/CRAN/Scripts/depends.R")
 rr <- reverse_dependencies_with_maintainers("lme4")
 source("lme4depfuns.R")  ## component/utility functions
@@ -27,8 +34,10 @@
 
 ## FIXME: why are R2admb, RLRsim, sdtalt, Zelig not getting checked?
 
+if (verbose) cat("setting up infrastructure\n")
 testdir <- getwd()
 
+## FIXME: should tarballdir="tarballs" etc. be arguments to a driver function?
 ## directory for tarballs to check
 tarballdir <- file.path(testdir,"tarballs")
 ## directory for ?? (at least current lme4 version ...)
@@ -47,11 +56,22 @@
 ##  have to do R CMD check
 
 pkgnames <- rr[,"Package"]
+
 names(pkgnames) <- pkgnames ## so results are named
 pkgnames <- pkgnames[!pkgnames %in% skippkgs]
+
+if (verbose) {
+    cat("packages to test:\n")
+    print(unname(pkgnames),quote=FALSE)
+}
+
+
 require(parallel)
 ## FIXME (maybe): mclapply doesn't work on Windows ?
-testresults <- mclapply(pkgnames,function(x) try(checkPkg(x,verbose=TRUE)))
+testresults <- mclapply(pkgnames,function(x) {
+    if (verbose) cat("checking package",x,"\n")
+    try(checkPkg(x,verbose=TRUE))
+})
 skipresults <- mclapply(skippkgs,function(x) try(checkPkg(x,skip=TRUE,verbose=TRUE)))
 testresults <- c(testresults,skipresults)
 

Modified: pkgtests/runtests
===================================================================
--- pkgtests/runtests	2013-04-17 21:09:55 UTC (rev 1810)
+++ pkgtests/runtests	2013-04-24 21:00:48 UTC (rev 1811)
@@ -7,7 +7,7 @@
 echo "R_LIBS_SITE=`pwd`/library" > ~/.R/check.Renviron
 echo "R_USER_SITE=`pwd`/library" >> ~/.R/check.Renviron
 ## make sure this applies for the following R CMD BATCH ...
-export R_LIBS_SITE=./library
+export R_LIBS_SITE=./library  ## seems redundant but not really?
 ## run tests
 R CMD BATCH --vanilla lme4deptests.R
 ## tear down testing environment



More information about the Lme4-commits mailing list