craigcitro / r-travis

Tools for using R with Travis (http://travis-ci.org) in lieu of a website:

Home Page:https://github.com/craigcitro/r-travis/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install packages listed in "Enhances"

hofnerb opened this issue · comments

Hi,

Can one tell the script to automatically also install packages listed in Enhances? Currently, install_deps(..., dependencies = TRUE), which is used in the travis-ci script, only installs packages from Depends, Imports, LinkingTo and Suggests but does not install Enhances.

One could doe this by specifying install_deps(..., dependencies = "Enhances"), but this command would end up in only installing packages that are enhanced. I am asking this as I have written two packages that enhance other packages and use these packages (conditionally) in their examples and test sections and I would love to run the checks on these as well.

Can I simply put a line such as

 Rscript -e 'library("devtools"); install_deps(dependencies = "Enhances")'

in my .travis.yml file? And where would I need to put this?

Perhaps related to this question: Can I require the script to install packages from http://R-forge.R-project.org?

I figured out that I can simply put

- Rscript -e 'library("devtools"); library(methods); options(repos=c(CRAN="http://cran.rstudio.com")); install_deps(dependencies = "Enhances")'

in the install: section in my .travis.yml, just after

- ./travis-tool.sh install_deps

to load the Enhances. Sorry that I opened this issue. Perhaps it helps someone in the future.

no problem at all -- feel free to add it to the wiki, either in the FAQ or in the recipes?