golem_opts: '{golem}' options

Description Usage Arguments Value Set Functions Get Functions

Description

Set and get a series of options to be used with {golem}. These options are found inside the golem-config.yml file, found in most cases inside the inst folder.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
set_golem_options(
  golem_name = pkgload::pkg_name(),
  golem_version = pkgload::pkg_version(),
  golem_wd = pkgload::pkg_path(),
  app_prod = FALSE,
  talkative = TRUE
)

set_golem_wd(path = pkgload::pkg_path(), talkative = TRUE)

set_golem_name(
  name = pkgload::pkg_name(),
  path = pkgload::pkg_path(),
  talkative = TRUE
)

set_golem_version(
  version = pkgload::pkg_version(),
  path = pkgload::pkg_path(),
  talkative = TRUE
)

get_golem_wd(use_parent = TRUE, path = pkgload::pkg_path())

get_golem_name(
  config = Sys.getenv("R_CONFIG_ACTIVE", "default"),
  use_parent = TRUE,
  path = pkgload::pkg_path()
)

get_golem_version(
  config = Sys.getenv("R_CONFIG_ACTIVE", "default"),
  use_parent = TRUE,
  path = pkgload::pkg_path()
)

Arguments

golem_name

Name of the current golem.

golem_version

Version of the current golem.

golem_wd

Working directory of the current golem package.

app_prod

Is the {golem} in prod mode?

talkative

Should the messages be printed to the console?

path

The path to set the golem working directory. Note that it will be passed to normalizePath.

name

The name of the app

version

The version of the app

use_parent

TRUE to scan parent directories for configuration files if the specified config file isn't found.

config

Name of configuration to read from. Defaults to the value of the R_CONFIG_ACTIVE environment variable ("default" if the variable does not exist).

Value

Used for side-effects for the setters, and values from the config in the getters.

Set Functions

Get Functions

Reads the information from golem-config.yml


golem documentation built on April 17, 2021, 9:06 a.m.