Reference files allow to check if results are correct. They are not just a copy of the result files. They are reencoded to avoid someone could just copy and paste from the reference to the results directories and cheat.
make_ref(
name,
...,
dir1 = here::here("tests", "results"),
dir2 = here::here("tests", "reference"),
nthreads = parallel::detectCores(logical = FALSE)
)
read_ref(
name,
...,
dir = here::here("tests", "reference"),
nthreads = parallel::detectCores(logical = FALSE)
)
Name of the result file to transform into a reference file
Further parameters passed to qs::qread()
Directory containing the result file
Directory where to place the reference file
Number of threads to use for reading or writing the files
Directory containing the reference file
The decoded content of the result file for read_ref()
or the
number of bytes written for make_ref()
.