Skip to contents

The 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.

Usage

.repro_package_plan(structure_df)

Arguments

structure_df

the data_check structure table (file_name, file_path, file_location)

Value

a plan with file_name, current_path, target_path (the file's own path in the package) and source (its file on disk), one row per path