BiocManager icon indicating copy to clipboard operation
BiocManager copied to clipboard

installing a local package with BiocManager?

Open lwaldron opened this issue 5 years ago • 5 comments

Unless I've missed something, you have to use an alternative like devtools::install('.', dependencies=TRUE, build_vignettes=TRUE, repos = BiocManager::repositories()) to install a local package normally or in Dockerfiles, taking us away from BiocManager as our one-and-only package manager. Could you either implement a local package installer, or document the recommended approach? Here's an example in the wild that could be a recommended approach. Note, it does not use the github remotes installation because it is meant to also run from alternative git branches.

https://github.com/seandavi/BuildABiocWorkshop/blob/3161063ee879720f866ba109048247906dea5a93/Dockerfile#L9

lwaldron avatar Jan 02 '21 17:01 lwaldron

I would rather document an alternative approach, since installing locally is not consistent with bioconductor best practices. PR welcome but I won't write one.

mtmorgan avatar Jan 02 '21 17:01 mtmorgan

How do you install and test when developing locally - with install.packages or devtools::install?

lwaldron avatar Jan 02 '21 18:01 lwaldron

My gut reaction here is that the best practice is for a package to start its life in github. Then BiocManager can install it.

vjcitn avatar Jan 02 '21 20:01 vjcitn

Personally I use devtools::load_all() etc leading naturally to ::check(); if i actually install the package it's usually from the command line R CMD INSTALL . so that I don't get anything unexpected from a devtools installation. Also there is no need to install package dependencies, other than via BiocManager::install()during the development process.

mtmorgan avatar Jan 02 '21 23:01 mtmorgan

Good to know; my thought is that version control should commence as soon as possible.

vjcitn avatar Jan 03 '21 00:01 vjcitn