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/Rtmpv54Aer"
fs::file_copy(
fs::path_package("sourcoise", "ipch", "prix_insee.R"),
dir,
overwrite = TRUE)
# Force execution (root is set explicitly here, it is normally deduced from project)
data <- sourcoise("prix_insee.R", force_exec = TRUE)
# Then we access metadata
sourcoise_meta("prix_insee.R")
#> $ok
#> [1] "cache ok&valid"
#>
#> $timing
#> [1] 0.0526
#>
#> $date
#> [1] "2025-04-05 15:19:16"
#>
#> $size
#> [1] 13680
#>
#> $args
#> list()
#>
#> $lapse
#> [1] "never"
#>
#> $track
#> list()
#>
#> $qmd_file
#> named list()
#>
#> $log_file
#> named list()
#>
#> $file_size
#> [1] 3373
#>
#> $data_date
#> [1] "2025-04-05 15:19:16.426536"
#>
#> $data_file
#> [1] "prix_insee-4262323b_d0beb32c350833a553e922e58f952f5b.qs2"
#>
#> $json_file
#> /tmp/Rtmpv54Aer/.sourcoise/prix_insee-4262323b_25f9ff25-1.json
#>