Search
Tutorial: Using Subversion to update /devel branch of Bioconductor package
0
16 months ago by
Stanford University
Bohdan Khomtchouk10 wrote:

Hello Everybody!

I recently wrote up a comprehensive "batteries included" recipe for R package developers and maintainers to easily update the development (/devel) branch of their Bioconductor packages smoothly and efficiently using Subversion.  Here's a step-by-step recipe from A-Z to make sure that you don't run into some of the same issues I did when I first started doing this kind of a thing:

1) Download your package from Bioconductor (note: my package is called geneXtendeR, so just substitute your package's name in its place in the commands below, and of course substitute your username (e.g., b.khomtchouk) and password... you should have received a separate congratulations email from Bioconductor with all this information included when your package first got accepted into Bioconductor).  Ok, here's the command:

svn co --username b.khomtchouk --password XXXXXXXX https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/geneXtendeR

3) Now bump the version from x.y.z to x.y.(z+1) in your package’s DESCRIPTION file. If the version is not properly changed your changes will not be made available in the Bioconductor public repository.

4) Now build your package tar ball with:

R CMD build geneXtendeR

5) Now check that the changes have produced a package consistent with R’s check facility:

R CMD check geneXtendeR_x.y.(z+1).tar.gz

6) Now fix any Warnings or Errors from the two steps above.

7) Now it's time to check all your files into Bioconductor's Subversion system.  To add all new files/changes at once in Subversion, do:

svn add --force * --auto-props --parents --depth infinity -q

8) Now check what you added in with the command above using:

svn status

9) If everything looks good, go ahead and commit it to Bioconductor:

svn commit --username b.khomtchouk --password XXXXXXXX -m "write_my_special_commit_message_here"

You're done!  The updated changes to your package are reflected in Bioconductor's development branch within the next day or two, depending on what time of day you committed your changes (e.g., before or after 5 pm).

P.S.  Make sure that in your package vignette, when you describe to users how to install your package, you don't accidentally do something like:

<<>>=
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("geneXtendeR")
library(geneXtendeR)
@

as this will install and then load the (out-of-date) version of your package from Bioconductor, causing all your builds to fail!  Thanks @MartinMorgan for catching this for me.  Instead, you should separate the install / load process and mark the install as not evaluated:

<<eval=FALSE>>=
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("geneXtendeR")
@

<<>>=
library(geneXtendeR)
@

P.P.S.  Also, be sure that your /vignettes directory does NOT have the build pdf.  This is sometimes easy to forget and, for some reason, R CMD check did not catch this for me the first time I did it.