[Gsdesign-commits] r192 - in pkg/gsDesignGUI: . R inst inst/doc inst/unitTests man src tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 9 23:29:43 CET 2009


Author: wconstan
Date: 2009-11-09 23:29:43 +0100 (Mon, 09 Nov 2009)
New Revision: 192

Added:
   pkg/gsDesignGUI/DESCRIPTION
   pkg/gsDesignGUI/NAMESPACE
   pkg/gsDesignGUI/R/
   pkg/gsDesignGUI/R/gsDesignGUI.R
   pkg/gsDesignGUI/R/zzz.R
   pkg/gsDesignGUI/inst/
   pkg/gsDesignGUI/inst/doc/
   pkg/gsDesignGUI/inst/doc/gsDesignGUI.pdf
   pkg/gsDesignGUI/inst/unitTests/
   pkg/gsDesignGUI/inst/unitTests/Makefile
   pkg/gsDesignGUI/man/
   pkg/gsDesignGUI/man/gsDesignGUI.Rd
   pkg/gsDesignGUI/src/
   pkg/gsDesignGUI/src/gsDesignGUI.c
   pkg/gsDesignGUI/tests/
   pkg/gsDesignGUI/tests/doRUnit.R
Log:
GSDG-8

* Created R-Forge repository for gsDesignGUI. Unlike the development repository for the package that we keep on seasvn in Seattle, this R-Forge repository will contain snapshots of gsDesignGUI as we progress in development. These snapshots will not contain the svn development history (comments, commits, etc.) but will facilitate an easy means for Keaven Anderson and other select people to review the current state of the code. This group will be limited on R-Forge until completion of the project.

Added: pkg/gsDesignGUI/DESCRIPTION
===================================================================
--- pkg/gsDesignGUI/DESCRIPTION	                        (rev 0)
+++ pkg/gsDesignGUI/DESCRIPTION	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,8 @@
+Package: gsDesignGUI
+Version: 1.0-0
+Title: Group Sequential Design GUI
+Author: REvolution Computing
+Maintainer: REvolution Computing <packages at revolution-computing.com>
+Description: Graphical user interface for the gsDesign package.
+Depends: R (>= 2.6.2), RUnit, Revobase, tools
+License: GPL-2

Added: pkg/gsDesignGUI/NAMESPACE
===================================================================
--- pkg/gsDesignGUI/NAMESPACE	                        (rev 0)
+++ pkg/gsDesignGUI/NAMESPACE	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,2 @@
+#useDynLib(gsDesignGUI)
+export(gsDesignGUI)

Added: pkg/gsDesignGUI/R/gsDesignGUI.R
===================================================================
--- pkg/gsDesignGUI/R/gsDesignGUI.R	                        (rev 0)
+++ pkg/gsDesignGUI/R/gsDesignGUI.R	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,3 @@
+gsDesignGUI <- function()
+{
+}
\ No newline at end of file

Added: pkg/gsDesignGUI/R/zzz.R
===================================================================
--- pkg/gsDesignGUI/R/zzz.R	                        (rev 0)
+++ pkg/gsDesignGUI/R/zzz.R	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,5 @@
+".onLoad" <- function(libname, pkgname){
+}
+
+.Last.lib <- function (libpath){
+}

Added: pkg/gsDesignGUI/inst/doc/gsDesignGUI.pdf
===================================================================
(Binary files differ)


Property changes on: pkg/gsDesignGUI/inst/doc/gsDesignGUI.pdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: pkg/gsDesignGUI/inst/unitTests/Makefile
===================================================================
--- pkg/gsDesignGUI/inst/unitTests/Makefile	                        (rev 0)
+++ pkg/gsDesignGUI/inst/unitTests/Makefile	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,16 @@
+TOP=../..
+PKG=${shell cd ${TOP};pwd}
+SUITE=doRUnit.R
+R=R
+
+all: inst test
+
+inst: # Install package
+	cd ${TOP}/..;\
+	${R} CMD INSTALL ${PKG}
+
+test: # Run unit tests
+	export RCMDCHECK=FALSE;\
+	cd ${TOP}/tests;\
+	${R} --vanilla --slave < ${SUITE}
+        
\ No newline at end of file

Added: pkg/gsDesignGUI/man/gsDesignGUI.Rd
===================================================================
--- pkg/gsDesignGUI/man/gsDesignGUI.Rd	                        (rev 0)
+++ pkg/gsDesignGUI/man/gsDesignGUI.Rd	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,18 @@
+\name{gsDesignGUI}
+\alias{gsDesignGUI}
+\docType{function}
+\title{Graphical user interface functionality for gsDesign}
+\description{
+The primary function to launch the gsDesign GUI
+}
+\usage{gsDesignGUI()}
+
+\details{
+The gsDesign GUI ...
+}
+
+\examples{
+gsDesignGUI()
+}
+
+\keyword{interface}

Added: pkg/gsDesignGUI/src/gsDesignGUI.c
===================================================================
--- pkg/gsDesignGUI/src/gsDesignGUI.c	                        (rev 0)
+++ pkg/gsDesignGUI/src/gsDesignGUI.c	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+        printf("Hello, gsDesignGUI World\n");
+        return 0;
+}

Added: pkg/gsDesignGUI/tests/doRUnit.R
===================================================================
--- pkg/gsDesignGUI/tests/doRUnit.R	                        (rev 0)
+++ pkg/gsDesignGUI/tests/doRUnit.R	2009-11-09 22:29:43 UTC (rev 192)
@@ -0,0 +1,61 @@
+## unit tests will not be done if RUnit is not available
+if(require("RUnit", quietly=TRUE)) {
+ 
+  ## --- Setup ---
+ 
+  pkg <- "gsDesignGUI" # <-- Change to package name!
+  
+  if(Sys.getenv("RCMDCHECK") == "FALSE") {
+    ## Path to unit tests for standalone running under Makefile (not R CMD check)
+    ## PKG/tests/../inst/unitTests
+    path <- file.path(getwd(), "..", "inst", "unitTests")
+  } else {
+    ## Path to unit tests for R CMD check
+    ## PKG.Rcheck/tests/../PKG/unitTests
+    path <- system.file(package=pkg, "unitTests")
+  }
+  cat("\nRunning unit tests\n")
+  print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path))
+ 
+  library(package=pkg, character.only=TRUE)
+ 
+  ## If desired, load the name space to allow testing of private functions
+  ## if (is.element(pkg, loadedNamespaces()))
+  ##     attach(loadNamespace(pkg), name=paste("namespace", pkg, sep=":"), pos=3)
+  ##
+  ## or simply call PKG:::myPrivateFunction() in tests
+ 
+  ## --- Testing ---
+ 
+  ## Define tests
+  testSuite <- defineTestSuite(name=paste(pkg, "unit testing"),
+                                          dirs=path)
+  ## Run
+  tests <- runTestSuite(testSuite)
+ 
+  ## Default report name
+  pathReport <- file.path(path, "report")
+ 
+  ## Report to stdout and text files
+  cat("------------------- UNIT TEST SUMMARY ---------------------\n\n")
+  printTextProtocol(tests, showDetails=FALSE)
+  printTextProtocol(tests, showDetails=FALSE,
+                    fileName=paste(pathReport, "Summary.txt", sep=""))
+  printTextProtocol(tests, showDetails=TRUE,
+                    fileName=paste(pathReport, ".txt", sep=""))
+ 
+  ## Report to HTML file
+  printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep=""))
+#  printHTMLProtocol(tests, fileName=file.path(dirname(dirname(getwd())),pkg,"gsDesign-RUnit-Test-Summary.html")) #paste(pathReport, ".html", sep=""))  
+ 
+  ## Return stop() to cause R CMD check stop in case of
+  ##  - failures i.e. FALSE to unit tests or
+  ##  - errors i.e. R errors
+  tmp <- getErrors(tests)
+  if(tmp$nFail > 0 | tmp$nErr > 0) {
+    stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail,
+               ", #R errors: ",  tmp$nErr, ")\n\n", sep=""))
+  }
+} else {
+  warning("cannot run unit tests -- package RUnit is not available")
+}



More information about the Gsdesign-commits mailing list