module_install: Install an outsider module

View source: R/install.R

module_installR Documentation

Install an outsider module

Description

Install a module through multiple different methods: via a code sharing site such as GitHub, a URL, a git repository or local filepath. The function will first install the R package and then build the Docker image. Docker image version is determined by "tag". To avoid pulling the image from DockerHub set "manual" to TRUE.

Usage

module_install(
  repo = NULL,
  url = NULL,
  filepath = NULL,
  git = NULL,
  service = c("github", "bitbucket", "gitlab"),
  tag = "latest",
  manual = FALSE,
  verbose = FALSE,
  force = FALSE,
  update = c("default", "ask", "always", "never")
)

Arguments

repo

Module repo, character.

url

URL to downloadable compressed (zip, tar or bzipped/gzipped) folder of a module, character.

filepath

Filepath to uncompressed directory of module, character.

git

URL to git repository

service

Code-sharing service. Character.

tag

Module version, default latest. Character.

manual

Build the docker image? Default FALSE. Logical.

verbose

Be verbose? Default FALSE.

force

Ignore warnings and install anyway? Default FALSE.

update

Update dependent R packages?

Details

All installation options depend on the installation functions of remotes. E.g. GitHub packages are installed with install_github. See these functions for more details on the R package installation process.

Value

Logical

See Also

Other public: is_module_installed(), module_details(), module_functions(), module_help(), module_import(), module_installed(), module_search(), module_uninstall()

Examples

library(outsider)
# NOT RUN (too slow for automated testing)
## Not run: 
  if (is_outsider_ready()) {
    # simplest repo
    repo <- 'dombennett/om..hello.world'
    # install
    module_install(repo = repo, force = TRUE, update = 'never')
    # is module_installed?
    (is_module_installed(repo = repo))
    # uninstall
    module_uninstall(repo)
  }

## End(Not run)

AntonelliLab/outsider documentation built on June 17, 2022, 3:27 p.m.