knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

shield

Lifecycle: experimental

The goal of shield is to create a simple workflow to install package first level dependencies exclusively from github remote repositories when available.

Installation

The development version from GitHub with:

# install.packages("remotes")
remotes::install_github("yonicd/shield")

Example

library(shield)
library(details)

Map the dependencies to the github remote repositories and the current master sha

desc_map <- create_map('DESCRIPTION')
desc_map

Create a temp libpath to install to

test_lib <- file.path(tempdir(),'mylib')
dir.create(test_lib)

Install the dependencies

install_remotes(obj = desc_map,lib = test_lib)

Click To See Console Output

install_remotes(obj = desc_map,lib = test_lib)


Install the package

remotes::install_local(lib = test_lib,force = TRUE, upgrade = TRUE)

Check to see that everything was installed

list.files(test_lib)

Check session_info of the default current libpath

sessioninfo::package_info(list.files(test_lib))

Check session_info of the temp libpath

withr::with_libpaths(test_lib,sessioninfo::package_info(list.files(test_lib)))


yonicd/shield documentation built on Dec. 9, 2023, 5:07 a.m.