One of my projects went from 2-3 mins to 13-15 mins after switching to packrat. Packrat is a dependency management system for R. The disadvantage is that the build time on travis is substantially increased. We don’t have to get the latest packages from CRAN when we build on travis, now we can have more control of the package versions that travis builds with in our project. The advantage of this is we can build on travis with the exact same packages that we’re using locally. This will start R, and builds the R packages in the local packrat directory so that they are available in the Travis machine.Īfter that, travis will continue and attempt to build the package, and will not need contact CRAN to get the dependencies because they are already available (assuming packrat is working as expected). ' Biogeographic implications of a packrat midden sequence from the Sacramento Mountains, south. The key lines in the above file are: install: ![]() travis.yml file like this: # R for travis: see documentation at For more background on how these commands fit into the packrat workflow, see the walkthrough. You can find more detailed documentation by typing help (package'packrat') at the R console. I’m hoping someone in the rOpenSci community might have already solved this problem.Īfter much trial and error and further reading, it seems that this will do it, with a. The following is a list of the R functions in the packrat package that you’ll use most often. Is there are simpler way? I’ve cross-posted this question at stack overflow (though it’s more of a devops question than a coding question) and at the Travis-CI issue tracker. travis.yml file: env:Īnd a fairly complex make/packrat.mk file which makes it all work, as well as doing other things. It seems like this has been achieved by richfitz/wood, with this in his. ![]() travis.yml) to get the package sources from my local packrat directory rather than CRAN? How can I configure travis (ideally with the. So this means I might get different package versions in my Travis build compared to my local build, which I want to avoid. But each time travis builds my package, it gets the packages that I depend on from CRAN, rather than my local packrat directory. So the directory is not empty, but (over CIFS) you have no way to see that. ![]() (I observe this bug on a CIFS client running 14.04.2 LTS, and a server running 12.04.5 LTS.). I’m also using Travis-ci to alert me if I make breaking changes to my package. If the directory is part of a filesystem mounted with CIFS (aka samba), and it contains a file that is a broken symbolic link, then ls fails to mention that file. I’m using packrat to store the packages that my package depends on, as you can see in a project I’m currently working on:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |