blade_setup: Setup bladerunr

View source: R/blade_setup.R

blade_setupR Documentation

Setup bladerunr

Description

blade_setup() is your first step. It sets up the function you want to repeat for each iteration, as well as various other settings for your run.

Usage

blade_setup(
  run_name,
  runr,
  output_dir = NULL,
  timeout = NULL,
  max_attempts = 2,
  log_output = FALSE
)

Arguments

run_name

The name of the run. Used for output folder naming.

runr

A function to be executed as the main test. Must receive two arguments: params and context. See vignette for more details.

output_dir

A path to be given to the runr, if required. Optional.

timeout

An int representing the time in seconds to allow the runr. If the runr exceeds it, the function will either try again or move on depending on the max_attempts value. Optional.

max_attempts

An int specifying the number of time to attempt a run before moving on. Optional.

log_output

If TRUE, runr output will be saved to a log in either your output_dir or working directory if no output_dir was specified. Defaults to FALSE.

Details

Detailed explanation of how the runr and setup work can be found at the README.

Examples


foo_run <- function() {
  # Do some fancy stuff
}

blade_setup("test-run", foo_run, "path/to/save/outputs")

datr-studio/bladerunr documentation built on April 12, 2022, 6:19 p.m.