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 iflocate
isTRUE
. This function does not require that the directory is configured for orderly, and can be anyoutpack
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 forroot
(or the working directory ifNULL
) and then up through its parents until it finds an.outpack
directory ororderly_config.yml
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.
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