
The package layout's plan: every file in its own place
Source:R/reproducibility_check.R
dot-repro_package_plan.RdThe Psych-DS layout (psychds_file_plan()) gives the code only the data
files it recognised, renamed and moved into Psych-DS folders, with the
code's paths rewritten to match. That suits a study whose scripts read a
few tables, but code that reads folders of images or scan files, or imports
its own helper modules from a subfolder, then fails for files that are in
the package (raw_data/scan1/img.tif became data/img.tif;
code/utils/helpers.py became analysis/helpers.py, so from utils import helpers failed). The package layout copies every file the run has (every
file of a local folder) to its own path in the package, so a path that
works in the package works in the sandbox; repro_rewrite_paths() still
rewrites a reference that does not (an absolute path on the author's
computer, a file in another folder) to where that file is.