Fetch information about the actively running report. This allows you to reflect information about your report back as part of the report, for example embedding the current report id, or information about computed dependencies. This information is in a slightly different format to orderly version 1.x and does not (currently) include information about dependencies when run outside of orderly_run, but this was never reliable previously.
Value
A list with elements
name
: The name of the current reportid
: The id of the current report,NA
if running interactivelyroot
: The orderly root pathdepends
: A data frame with information about the dependencies (not available interactively)index
: an integer sequence along calls toorderly_dependency
name
: the name of the dependencyquery
: the query used to find the dependencyid
: the computed id of the included packetfilename
: the file used from the packetas
: the filename used locally
Examples
# An example from the orderly examples
orderly_example_show("run_info")
#>
#> ── src/run_info/run_info.R ─────────────────────────────────────────────────────
#> orderly_dependency("data", "latest", c("xy.rds" = "data.rds"))
#> xy <- readRDS("xy.rds")
#>
#> info <- orderly_run_info()
#> print(info)
#>
#> orderly_artefact("plot.png", description = "A plot of data")
#> png("plot.png")
#> plot(xy)
#> dev.off()
# Prepare to run
path <- orderly_example()
#> ✔ Created orderly root at '/tmp/Rtmp6Hh44x/orderly2_ex_1d3ea1c0420'
orderly_run("data", root = path, echo = FALSE)
#> ℹ Starting packet 'data' `20250901-150653-6e581b9e` at 2025-09-01 15:06:53.435557
#> ✔ Finished running data.R
#> ℹ Finished 20250901-150653-6e581b9e at 2025-09-01 15:06:53.459993 (0.024436 secs)
#> [1] "20250901-150653-6e581b9e"
# Here, see the printed information from a real running report
orderly_run("run_info", root = path)
#> ℹ Starting packet 'run_info' `20250901-150653-7bdb6d6d` at 2025-09-01 15:06:53.488245
#> > orderly_dependency("data", "latest", c("xy.rds" = "data.rds"))
#> ℹ Depending on data @ `20250901-150653-6e581b9e` (via latest(name == "data"))
#> > xy <- readRDS("xy.rds")
#> > info <- orderly_run_info()
#> > print(info)
#> $name
#> [1] "run_info"
#>
#> $id
#> [1] "20250901-150653-7bdb6d6d"
#>
#> $root
#> [1] "/tmp/Rtmp6Hh44x/orderly2_ex_1d3ea1c0420"
#>
#> $depends
#> index name query id there here
#> 1 1 data latest(name == "data") 20250901-150653-6e581b9e data.rds xy.rds
#>
#> > orderly_artefact("plot.png", description = "A plot of data")
#> > png("plot.png")
#> > plot(xy)
#> > dev.off()
#> agg_record_894944129
#> 2
#> ✔ Finished running run_info.R
#> ℹ Finished 20250901-150653-7bdb6d6d at 2025-09-01 15:06:53.547525 (0.0592804 secs)
#> [1] "20250901-150653-7bdb6d6d"