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

Packages in non-CRAN repositories

siddharthab opened this issue · comments

We should have an option to add more repositories other than CRAN when checking for dependencies. Specially Bioconductor. See ?setRepositories.

it's easy enough to add bioconductor packages; bioconductor in particular is probably popular enough that it deserves a top-level install_bioc option in travis-tool.

or did you want this to happen on package install? is that supported for CRAN packages (i.e. can i have a CRAN package with bioc-only dependencies)?

This is for a package in the bioconductor repo. Ideally I want the package deps from the DESCRIPTION file instead of manually specifying them in travis.yml. Actually anything other than that is a hack to get the tests passing. I thought that maybe setting the repos option in .Rprofile will work even for R CMD CHECK. But apparently, not. The Bioconductor community must have a standard practice of doing this. Something like R -e "install.packages('ggbio')" does work on the command line so I might be missing something trivial. I will look into this a bit more.

what about a "setup bioc" function that installs and then adds the repo to the local r profile?

So I am not sure about the standard practice in the DESCRIPTION file when you have dependencies from more than one repo. But essentially, if I do setOption("repos"=c(CRAN='...', Biocsoft='...') in my .Rprofile, I expect R CMD CHECK to work with a completely new installation of R. If this is the standard practice, then I will like this to be extended for any repository location, even a user's personal repository.

so i'm not clear: does adding a bioc repo work without doing the one-time source("http://bioconductor.org/biocLite.R"); biocLite() call? in particular, i'm not sure what you mean by "in a completely new installation of R" -- IIRC there's always a one-time setup step for bioc; I'm just trying to figure out the cleanest way to make that work here.

a few easy options:

  1. add a line in the config that just adds the line you mention to the local .Rprofile
  2. add a line to do an Rscript -e 'install.packages('some_bioc_package', repos='bio_repo')'
  3. one of the above, but with an explicit bioc install step.

hmm, how did this get closed? s'what i get for looking at it on android. ;)

Let me reply after finding out the standard practice in bioconductor community. There's no rush for this and I have been replying to this thread on my phone. I guess some more due diligence is required on my part. :-)

so this is happily now handled by #118; one can just do

- ./travis-tool.sh bioc_install BiocPackageName

and it works as expected. definitely let me know if you hit issues.