[med-svn] [r-bioc-cummerbund] 01/04: Add autopkgtest based on vignettes

Andreas Tille tille at debian.org
Sun Jun 28 20:09:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-bioc-cummerbund.

commit 3a04f51e363079cfee69291483735ae930c61014
Author: Andreas Tille <tille at debian.org>
Date:   Fri Oct 24 14:17:39 2014 +0200

    Add autopkgtest based on vignettes
---
 debian/README.test                                |  7 ++-
 debian/changelog                                  |  1 +
 debian/docs                                       |  1 +
 debian/examples                                   |  1 +
 debian/patches/series                             |  1 +
 debian/patches/suppress_test_writing_to_usr.patch | 76 +++++++++++++++++++++++
 debian/tests/control                              |  3 +
 debian/tests/run-unit-test                        | 18 ++++++
 8 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/debian/README.test b/debian/README.test
index 8da1c86..55a9142 100644
--- a/debian/README.test
+++ b/debian/README.test
@@ -1,5 +1,8 @@
 Notes on how this package can be tested.
 ────────────────────────────────────────
 
-This package can be tested by loading it into R with the command
-‘library(cummeRbund)’ in order to confirm its integrity.
+To run the unit tests provided by the package you can do
+
+   sh  run-unit-test
+
+in this directory.
diff --git a/debian/changelog b/debian/changelog
index 557d258..aa389e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ r-bioc-cummerbund (2.8.0-1) UNRELEASED; urgency=medium
   * cme fix dpkg-control
   * Update dependencies
   * Update copyright info
+  * Add autopkgtest based on vignettes
 
  -- Andreas Tille <tille at debian.org>  Wed, 22 Oct 2014 13:24:34 +0200
 
diff --git a/debian/docs b/debian/docs
index 50f6656..9a4f4f8 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,2 @@
 debian/README.test
+debian/tests/run-unit-test
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..18244c8
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+vignettes
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c11d124
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+suppress_test_writing_to_usr.patch
diff --git a/debian/patches/suppress_test_writing_to_usr.patch b/debian/patches/suppress_test_writing_to_usr.patch
new file mode 100644
index 0000000..5f7065b
--- /dev/null
+++ b/debian/patches/suppress_test_writing_to_usr.patch
@@ -0,0 +1,76 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 22 Oct 2014 13:24:34 +0200
+Description: Since it is not allowed to write to /usr
+ one part of the vignette was removed.  This avoids the following error:
+ .
+ .
+ > cuff <- readCufflinks(dir = myDir, gtfFile = gtfFile, 
+ +     genome = "hg19", rebuild = T)
+ Creating database /usr/lib/R/site-library/cummeRbund/extdata/cuffData.db
+ Error in sqliteNewConnection(drv, ...) : 
+   RS-DBI driver: (could not connect to dbname:
+ unable to open database file
+ )
+ Calls: source ... .valueClassTest -> is -> is -> sqliteNewConnection -> .Call
+ .
+ .
+ However, it needs to be verified whether the code that tries to create a
+ database in /usr needs to be patched to redirect the database creation
+ to /var.
+
+--- a/vignettes/cummeRbund-example-workflow.Rnw
++++ b/vignettes/cummeRbund-example-workflow.Rnw
+@@ -59,30 +59,6 @@ This guide is being released as is, with
+ 
+ \section{Workflow Summary}
+ 
+-\section{Reading cuffdiff output}
+-<<loadLib>>=
+-library(cummeRbund)
+-@
+-<<read>>=
+-cuff <- readCufflinks(dir=system.file("extdata", package="cummeRbund"))
+-cuff
+-@
+-This example uses the 'test' dataset that is included in the cummeRbund package. Importantly, if your current working directory contains the output
+-from your cuffdiff analysis, simply calling \Rfunction{cuff<-readCufflinks()} will automatically find the default files and begin parsing your data.
+-
+-\section{Quality Assessment of data}
+-
+-\subsection{Evaluating model fit}
+-<<model_fit_1,include=FALSE>>=
+-d<-dispersionPlot(genes(cuff))
+-d
+-@
+-
+-<<label=model_fit_1_plot,fig=TRUE,echo=FALSE>>=
+-<<model_fit_1>>
+-print(d)
+-@
+-
+ \subsection{Identifying outlier replicates}
+ <<rep_boxplot_1,include=FALSE>>=
+ pBoxRep<-csBoxplot(genes(cuff),replicates=T)
+--- a/vignettes/cummeRbund-manual.Rnw
++++ b/vignettes/cummeRbund-manual.Rnw
+@@ -248,19 +248,7 @@ To read these files, populate the 'cuffD
+ library(cummeRbund)
+ @
+ %%fileDir<-("../../extdata/")
+-<<read,echo=FALSE>>=
+-myDir<-system.file("extdata", package="cummeRbund") #You can leave blank if cwd or replace with your own directory path.
+-gtfFile<-system.file("extdata/chr1_snippet.gtf",package="cummeRbund") #path to .gtf file used in cuffdiff analysis.
+-cuff <- readCufflinks(dir=myDir,gtfFile=gtfFile,genome="hg19",rebuild=T)
+-@
+-
+-<<read2,eval=FALSE>>=
+-cuff<-readCufflinks()
+-@
+-
+-<<read3>>=
+-cuff
+-@
++% DELETED
+ 
+ Again, by default $dir$ is assumed to be the current working directory and \code{cuff<-readCufflinks()} should work if all appropriate files are in the current working directory. We now also
+ recommend that you use both the \Rfunarg{genome} and \Rfunarg{gtfFile} arguments to readCufflinks(). This will allow cummeRbund to archive the transcript structure information located in the .gtf file associated with
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..9b3ef88
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+oname=cummeRbund
+pkg=r-bioc-`echo $oname | tr [A-Z] [a-z]`
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp /usr/share/doc/$pkg/examples/vignettes/* $ADTTMP
+find . -name "*.gz" -exec gunzip \{\} \;
+for rnw in `ls *.[rRS]nw` ; do
+rfile=`echo $rnw | sed 's/\.[rRS]nw/.R/'`
+LC_ALL=C R --no-save <<EOT
+  Stangle("$rnw")
+  source("$rfile", echo=TRUE)
+EOT
+done
+# rm -rf *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-cummerbund.git



More information about the debian-med-commit mailing list