Skip to contents

Set configuration options. Not all can currently be set; this will be expanded over time. See Details.

Usage

orderly_config_set(..., options = list(...), root = NULL, locate = TRUE)

Arguments

...

Named options to set (e.g., pass the argument core.require_complete_tree = TRUE)

options

As an alternative to ..., you can pass a list of named options here (e.g., list(core.require_complete_tree = TRUE)). This interface is typically easier to program against.

root

The path to the root directory, or NULL (the default) to search for one from the current working directory if locate is TRUE. This function does not require that the directory is configured for orderly, and can be any outpack root (see orderly_init for details).

locate

Logical, indicating if the root should be searched for. If TRUE, then we looks in the directory given for root (or the working directory if NULL) and then up through its parents until it finds an .outpack directory or orderly_config.yml

Value

Nothing

Details

Options are set in the order that they are provided. Currently, if setting one option fails, no further options will be processed but previous ones will be (do not rely on this behaviour, it may change).

Currently you can set:

  • core.require_complete_tree

See orderly_init for description of these options.

See also

orderly_config

Examples


# The default configuration does not include a file store, and
# saves output within the "archive" directory:
path <- withr::local_tempdir()
orderly2::orderly_init(path)
#>  Created orderly root at '/tmp/RtmprnCT52/file171612989548'
fs::dir_tree(path, all = TRUE)
#> /tmp/RtmprnCT52/file171612989548
#> ├── .outpack
#> │   ├── config.json
#> │   ├── location
#> │   └── metadata
#> └── orderly_config.yml

# Change this after the fact:
orderly2::orderly_config_set(core.use_file_store = TRUE,
                             core.path_archive = NULL,
                             root = path)
fs::dir_tree(path, all = TRUE)
#> /tmp/RtmprnCT52/file171612989548
#> ├── .outpack
#> │   ├── config.json
#> │   ├── files
#> │   ├── index
#> │   │   └── outpack.rds
#> │   ├── location
#> │   └── metadata
#> └── orderly_config.yml