sourcoise_meta: Returns sourcoise metadata on a script

View source: R/sourcoise_meta.R

sourcoise_metaR Documentation

Returns sourcoise metadata on a script

Description

quick acces to metadata of the script, data is not fecthed.

Usage

sourcoise_meta(path, args = NULL)

Arguments

path

(character) path of the script

args

(named list) arguments of the script if any

Details

  • timing: time of full script execution

  • date: date of last full execution

  • size: size of objects returned (in R memory)

  • args: args given to sourcoise for the script

  • lapse: dely before reexecution

  • track: list of files tracked

  • qmd_file: list of qmd calling this script

  • log_file: last log file

  • file_size: size of data cached on disk

  • data_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)

Value

a named list with cache information

Examples

dir <- tempdir()
set_sourcoise_root(dir)
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")


sourcoise documentation built on June 8, 2025, 1:03 p.m.