activate: Activate touchstone environment

View source: R/source.R

activateR Documentation

Activate touchstone environment

Description

This sets environment variables, R options and library paths to work interactively on the touchstone_script.

Usage

activate(
  head_branch = gert::git_branch(),
  base_branch = getOption("touchstone.default_base_branch", "main"),
  n = 1,
  env = parent.frame()
)

deactivate(env = parent.frame())

Arguments

head_branch

Git branch to be used as the GITHUB_HEAD_REF branch (i.e. the branch with new changes) when running benchmarks. Defaults to the current branch.

base_branch

Git branch for the GITHUB_BASE_REF (i.e. the branch you want to merge your changes into) when running benchmarks. Defaults to 'main' if the option touchstone.default_base_branchis not set.

n

Number of times benchmarks should be run for each branch. Will override n argument in all interactive calls to benchmark_run().

env

In which environment the temporary changes should be made. For use within functions.

Functions

  • deactivate(): Restore the original environment state.

Examples

## Not run: 
activate()
# You can now test parts of your touchstone script, e.g. touchstone/script.R
deactivate()

## End(Not run)

lorenzwalthert/touchstone documentation built on April 20, 2024, 9:57 a.m.