orderly_commit: Commit a generated report

View source: R/recipe_commit.R

orderly_commitR Documentation

Commit a generated report

Description

Commit a generated report, moving it from the ⁠draft/⁠ directory to ⁠archive/⁠ and updating the orderly index. Once committed, reports should not be deleted.

Usage

orderly_commit(id, name = NULL, root = NULL, locate = TRUE, timeout = 10)

Arguments

id

The identifier of the report

name

The name of the report - this can be omitted and the name will be determined from the id.

root

The path to an orderly root directory, or NULL (the default) to search for one from the current working directory if locate is TRUE.

locate

Logical, indicating if the configuration should be searched for. If TRUE and config is not given, then orderly looks in the working directory and up through its parents until it finds an orderly_config.yml file.

timeout

Time in seconds to wait for db to be available. In parallel the database may become locked so we can choose to wait for timeout seconds before throwing an error.

Value

The path to the newly committed report

Examples

# In a new example orderly, run a report
path <- orderly::orderly_example("minimal")
id <- orderly::orderly_run("example", root = path)

# To commit it, all we need is the report id
orderly::orderly_commit(id, root = path)

# The report is now committed, and as such could be used as a
# dependency in another report and is not subject to deletion by
# orderly::orderly_cleanup
orderly::orderly_list_archive(root = path)

vimc/orderly documentation built on July 8, 2023, 2:31 a.m.