quick acces to metadata of the script, data is not fecthed.
Details
timing
: time of full script executiondate
: date of last full executionsize
: size of objects returned (in R memory)args
: args given to sourcoise for the scriptlapse
: dely before reexecutiontrack
: list of files trackedqmd_file
: list of qmd calling this scriptlog_file
: last log filefile_size
: size of data cached on diskdata_date
: date of last data save (if no new data when executed, no data is saved)data_file
: path to data cached (as a qs2 data file)file
: path to the json file storing metadata (and .sourcoise dir)
Examples
dir <- tempdir()
set_sourcoise_root(dir)
#> [1] "/tmp/RtmpAp6oTp"
fs::file_copy(
fs::path_package("sourcoise", "some_data.R"),
dir,
overwrite = TRUE)
# Force execution (root is set explicitly here, it is normally deduced from project)
data <- sourcoise("some_data.R", force_exec = TRUE)
# Then we access metadata
sourcoise_meta("some_data.R")
#> $ok
#> [1] "cache ok&valid"
#>
#> $timing
#> [1] 0.0098
#>
#> $date
#> [1] "2025-05-27 15:59:37"
#>
#> $size
#> [1] 2616
#>
#> $args
#> list()
#>
#> $lapse
#> [1] "never"
#>
#> $track
#> list()
#>
#> $qmd_file
#> named list()
#>
#> $log_file
#> named list()
#>
#> $file_size
#> [1] 242
#>
#> $data_date
#> [1] "2025-05-27 15:59:37.601905"
#>
#> $data_file
#> [1] "some_data-4262323b_f92a79811b1d8866b336be3b35cd7f50.qs2"
#>
#> $json_file
#> /tmp/RtmpAp6oTp/.sourcoise/some_data-4262323b_1c1cdaf6-1.json
#>