aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2014-10-06 22:40:36 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2014-10-06 22:40:36 +0200
commit8d7007876dbc01285616817ec261975aa520808c (patch)
tree2c390461c88452d96742effa7c24b084e3fb21c7
parent7ec7a3ab7fe9a01a29f858de2087bba1e575b374 (diff)
New static documentation, installation using repository
The Makefile was enhanced to support generating static documentation, which will also point to vignettes (e.g. a manual) that will be written in the future. Installation instructions were updated to describe the much easier installation from the newly created repository.
-rw-r--r--.Rbuildignore1
-rw-r--r--.gitignore1
-rw-r--r--DESCRIPTION7
-rw-r--r--GNUmakefile80
-rw-r--r--README.md91
-rw-r--r--inst/staticdocs/README2
6 files changed, 120 insertions, 62 deletions
diff --git a/.Rbuildignore b/.Rbuildignore
index dba8928..a4c9c0d 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -1,3 +1,4 @@
GNUmakefile
NEWS.md
gmkin_screenshot.png
+futurevignettes
diff --git a/.gitignore b/.gitignore
index edc0071..de2ab97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
NEWS
+inst/web*
diff --git a/DESCRIPTION b/DESCRIPTION
index 93e9ff2..25159d5 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: gmkin
Type: Package
Title: GUI for fitting kinetic models to chemical degradation data with mkin
-Version: 0.5-2
-Date: 2014-09-30
+Version: 0.5-3
+Date: 2014-10-06
Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"),
email = "jranke@uni-bremen.de"),
person("Eurofins Regulatory AG", role = "cph"))
@@ -15,4 +15,5 @@ LazyLoad: yes
LazyData: yes
Encoding: UTF-8
BugReports: http://github.com/jranke/gmkin/issues
-URL: http://github.com/jranke/gmkin
+URL: http://kinfit.r-forge.r-project.org/gmkin_static,
+ http://github.com/jranke/gmkin
diff --git a/GNUmakefile b/GNUmakefile
index b034b3e..a3f98c3 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,41 +1,83 @@
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename $(PWD))
+TGZ := ../$(PKGSRC)_$(PKGVERS).tar.gz
+TGZVNR := ../$(PKGSRC)_$(PKGVERS)-vignettes-not-rebuilt.tar.gz
# Specify the directory holding R binaries. To use an alternate R build (say a
# pre-prelease version) use `make RBIN=/path/to/other/R/` or `export RBIN=...`
# If no alternate bin folder is specified, the default is to use the folder
# containing the first instance of R on the PATH.
RBIN ?= $(shell dirname "`which R`")
+#
+# Specify static documentation directories for subversion on r-forge
+RFSVN ?= $(HOME)/svn/kinfit.r-forge
+SDDIR ?= $(RFSVN)/www/gmkin_static
.PHONY: help
-help:
- @echo "\nExecute development tasks for $(PKGNAME)\n"
- @echo "Usage: \`make <task>\` where <task> is one of:"
- @echo ""
- @echo "Development Tasks"
- @echo "-----------------"
- @echo " build Create the package"
- @echo " check Invoke build and then check the package"
- @echo " install Invoke build and then install the result"
- @echo ""
-
-#------------------------------------------------------------------------------
-# Development Tasks
-#------------------------------------------------------------------------------
+pkgfiles = NEWS \
+ data/* \
+ DESCRIPTION \
+ inst/staticdocs/README \
+ man/* \
+ NAMESPACE \
+ R/* \
+ README.md \
+ TODO
+ # TODO \
+ # vignettes/*
+
+all: NEWS check clean
NEWS: NEWS.md
sed -e 's/^-/ -/' -e 's/^## *//' -e 's/^#/\t\t/' <NEWS.md | fmt -80 >NEWS
-build: NEWS
+$(TGZ): $(pkgfiles)
cd ..;\
"$(RBIN)/R" CMD build $(PKGSRC)
-install: build
+$(TGZVNR): $(pkgfiles)
cd ..;\
- "$(RBIN)/R" CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
+ "$(RBIN)/R" CMD build $(PKGSRC) --no-build-vignettes;\
+ cd $(PKGSRC);\
+ mv $(TGZ) $(TGZVNR)
+
+build: $(TGZ)
+
+build-no-vignettes: $(TGZVNR)
+
+install: build
+ "$(RBIN)/R" CMD INSTALL $(TGZ)
+
+install-no-vignettes: build-no-vignettes
+ "$(RBIN)/R" CMD INSTALL $(TGZVNR)
check: build
- cd ..;\
- "$(RBIN)/R" CMD check --as-cran $(PKGNAME)_$(PKGVERS).tar.gz
+ # Vignettes have been rebuilt by the build target
+ "$(RBIN)/R" CMD check --as-cran --no-tests --no-build-vignettes $(TGZ)
+
+check-no-vignettes: build-no-vignettes
+ mv $(TGZVNR) $(TGZ)
+ "$(RBIN)/R" CMD check --as-cran --no-tests $(TGZ)
+ mv $(TGZ) $(TGZVNR)
+
+vignettes/gmkin_manual.pdf: vignettes/gmkin_manual.Rnw
+ "$(RBIN)/Rscript" -e "tools::buildVignette(file = 'vignettes/gmkin_manual.Rnw', dir = 'vignettes')"
+
+vignettes:
+#vignettes: vignettes/gmkin_manual.pdf
+
+sd:
+ "$(RBIN)/Rscript" -e "library(staticdocs); build_site()"
+
+move-sd:
+ rm -rf $(SDDIR)/*;\
+ cp -r inst/web/* $(SDDIR); cd $(SDDIR) && svn add --force .
+
+r-forge: sd move-sd
+ cd $(RFSVN) && svn commit -m 'update gmkin static documentation from github repository'
+
+clean:
+ $(RM) -r $(PKGNAME).Rcheck/
+ $(RM) vignettes/*.R
diff --git a/README.md b/README.md
index 29c2fb6..41bd8ac 100644
--- a/README.md
+++ b/README.md
@@ -10,73 +10,84 @@ ExtJS which is bundled with gWidgetsWWW2.
## Installation
For running gmkin you need a system running a recent version of R (version
-3.0.0 or later should be OK), the gWidgesWWW2 package from github, the gmkin
-package and a web browser (Firefox and Chrome work for me) with
-JavaScript enabled.
+3.0.0 or later should be OK), the gWidgesWWW2 package, the gmkin package and a
+web browser (Firefox and Chrome work for me) with JavaScript enabled.
It should be possible to run gmkin on most laptop or desktop computers running
Linux, Mac OS X, Windows XP or Windows 7. It is frequently checked under Linux and
Windows 7.
-### Installing R
+### Notes on the gWidgetsWWW2 package
+
+The R package gWidgetsWWW2 is not available on CRAN because it contains
+path names with more then 100 characters in the JavaScript files which limits
+its portability. Also, it attaches an R object called `app` to the global
+environment in R, which is not allowed by the CRAN package policy. It is not
+a widely used library for creating graphical user interfaces, is not supported
+by a commercial company and was used for gmkin simply because it makes it
+possible to create a reasonably complex user interface by just writing R code.
-For Linux users, binary R packages should be available through the usual package repositories.
-For more information for the most common distributions, please refer to
-[CRAN](http://cran.r-project.org/bin/linux).
+### Installing R
-[Windows](http://cran.r-project.org/bin/windows) and [Mac OS X](http://cran.r-project.org/bin/macosx)
-users are also referred to the respective pages on [CRAN](http://cran.r-project.org) where
-there is more background information, notably an
-[R for Windows FAQ](http://cran.r-project.org/bin/windows/base/rw-FAQ.html).
+Please refer to [CRAN](http://cran.r-project.org) for installation instructions
+and binary packages. If you are on Windows and would like to upgrade your R
+installation, please refer to the respective [FAQ entry](http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f).
-### Installing the devtools package
+### Installing gmkin using an additional repository
-Installation of gWidgetsWWW2 and gmkin directly from
-[github](http://github.com) is facilitated by installing the R package `devtools`
-using either the Menu, or, more conveniently, using the R command
+Windows and Linux users running R 3.1.0 or later can make use of the gmkin
+package repository on r-forge. If you would like to test gmkin just once, open
+the R console and issue the commands
```s
-install.packages("devtools")
+setRepositories(addURLs = c(gmkin_repo = "http://kinfit.r-forge.r-project.org/repo"))
+install.packages("gmkin")
```
-### Installing gWidgetsWWW2
+This should pull the gmkin package and its dependencies, notably the
+gWidgetsWWW2 package which is not available from the CRAN archive (see above).
-The gWidgetsWWW2 package provides the glue between R code defining the
-graphical user interface (GUI) and the internal R help server which serves
-the GUI elements in the form of JavaScript. The JavaScript library ExtJS
-is used for this, and it is bundled in the gWidgetsWWW2 package.
+### Keeping it current
-Therefore, the package is a bit large. It is not available on CRAN because it
-contains very long path names in the JavaScript files which limits its portability.
-Also, it attaches an R object called `app` to the global environment in R, which
-is not allowed by the CRAN package policy.
+If you would like to pull in new versions of gmkin from time to time, you could
+add this repository to your startup options, e.g. by including a command like
-Installation is easy using the devtools library in R, so make sure it is installed, and
-then run
+```s
+options(repos = c(CRAN = "http://cran.rstudio.com",
+ gmkin_repo = "http://kinfit.r-forge.r-project.org/repo"))
+```
+
+to your startup options, e.g. to your `.Rprofile` file. Please consult the help
+page for this, e.g. by typing
```s
-require(devtools)
-install_github("gWidgetsWWW2", "jverzani", quick = TRUE)
+?Startup
```
-Installing gWidgetsWWW2 yields a lot of warnings concerning overly long path
-names. Using `quick = TRUE` skips docs, multiple-architecture builds, demos,
-and vignettes, to make installation as fast and painless as possible.
+You can than update your packages including gmkin by using `update.packages()`,
+please see its help files for details.
+
+The latest changes to gmkin are recorded in the
+[NEWS](https://github.com/jranke/gmkin/blob/master/NEWS.md) file,
+more details can be found in the
+[commit history](https://github.com/jranke/gmkin/commits/master).
+
-### Installing gmkin
+### Installation using the devtools package
-Then you can install gmkin, also directly from github:
+Users of the `devtools` package can also install gWidgetsWWW2 and gmkin directly from
+the respective github repositories:
```s
require(devtools)
-install_github("gmkin", "jranke", quick = TRUE)
+install_github("jverzani/gWidgetsWWW2", quick = TRUE)
+install_github("jranke/gmkin", quick = TRUE)
```
-The same command can be run if you want to update gmkin. See the
-[NEWS](https://github.com/jranke/gmkin/blob/master/NEWS.md) file
-for a list of recent changes, or the
-[commit history](https://github.com/jranke/gmkin/commits/master)
-if you are interested in the details.
+Installing gWidgetsWWW2 in this way yields a lot of warnings concerning overly
+long path names (see Notes on gWidgetsWWW2 above). Using `quick = TRUE` skips
+docs, multiple-architecture builds, demos, and vignettes, to make installation
+as fast and painless as possible.
## Usage
diff --git a/inst/staticdocs/README b/inst/staticdocs/README
new file mode 100644
index 0000000..0ec42e6
--- /dev/null
+++ b/inst/staticdocs/README
@@ -0,0 +1,2 @@
+This directory is simply here because building with current
+staticdocs versions does now work without it.

Contact - Imprint