tic (version 0.2.13.9010)

DSL: tic's domain-specific language

Description

Functions to define stages and their constitutent steps.

get_stage() returns a Stage object for a stage given by name. This function only works when called by load_from_file().

add_step() adds a step to a stage, see step_hello_world() and the links therein for available steps.

add_code_step() is a shortcut for add_step(step_run_code(...)).

add_package_checks() adds default steps related to package checks to the "before_install", "install", "script" and "after_success" stages:

  1. A step_rcmdcheck() in the "script" stage, using the warnings_are_errors, notes_are_errors, args, and build_args arguments.

  2. A call to covr::codecov() in the "after_success" stage (only for non-interactive CIs)

Usage

get_stage(name)

add_step(stage, step)

add_code_step(stage, call = NULL, prepare_call = NULL)

add_package_checks(..., warnings_are_errors = NULL, notes_are_errors = NULL, args = c("--no-manual", "--as-cran"), build_args = "--force", error_on = "warning", repos = getOption("repos"), timeout = Inf)

Arguments

name

[string] The name for the stage.

stage

[Stage] A Stage object as returned by get_stage().

step

[function] A function that constructs a Step object, such as step_hello_world().

call

[call] An arbitrary R expression executed during the stage to which this step is added. The default is useful if you only pass prepare_call.

prepare_call

[call] An optional arbitrary R expression executed during preparation.

...

Ignored, used to enforce naming of arguments.

warnings_are_errors

[flag] Deprecated, use error_on.

notes_are_errors

[flag] Deprecated, use error_on.

args

[character] Passed to rcmdcheck::rcmdcheck(), default: c("--no-manual", "--as-cran").

build_args

[character] Passed to rcmdcheck::rcmdcheck(), default: "--force".

error_on

[character] Whether to throw an error on R CMD check failures. Note that the check is always completed (unless a timeout happens), and the error is only thrown after completion. If "never", then no errors are thrown. If "error", then only ERROR failures generate errors. If "warning", then WARNING failures generate errors as well. If "note", then any check failure generated an error.

repos

[character] Passed to rcmdcheck::rcmdcheck(), default: getOption("repos").

timeout

[numeric] Passed to rcmdcheck::rcmdcheck(), default: Inf.