Resolve and validate settings file path
parse_settings_path.RdEnsures the settings YAML path is absolute and exists, using environment variables and code root as fallback.
Details
Prevents silent misconfiguration and enforces reproducibility.
Checks WEIGHTING_SETTINGS_PATH env var if not provided.
Converts relative paths to absolute using code root.
Stops with error if file does not exist or extension is wrong.
See also
scripts/000_run_weight_scripts.R
Other settings management:
check_write_to_db(),
get_settings(),
parse_code_root(),
parse_raw_data_root(),
set_defaults(),
update_data_root(),
update_directories(),
update_settings_pums_vars()
Examples
## Not run:
Sys.setenv(WEIGHTING_SETTINGS_PATH = "configs/examples/example_settings.yaml")
parse_settings_path("configs/example.yaml")
#> Error in parse_settings_path("configs/example.yaml"): could not find function "parse_settings_path"
## End(Not run)