Wire local-only data setup workflow

This commit is contained in:
aseimel
2026-06-15 14:38:47 +02:00
parent b5ca9370f1
commit d9c648bd54
21 changed files with 2442 additions and 110 deletions
+22 -1
View File
@@ -4,4 +4,25 @@ set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
cd "$repo_root"
Rscript -e 'setwd("data"); source("../src/r/00_data-management.R")'
required_model_inputs=(
"data/text_data.csv"
"data/expert.csv"
"data/lr_data.csv"
"data/union_mapping.csv"
"data/party_families.csv"
)
missing=0
for input in "${required_model_inputs[@]}"; do
if [ ! -s "$input" ]; then
echo "Missing model-ready input: $input" >&2
missing=1
fi
done
if [ "$missing" -ne 0 ]; then
echo "Regenerate model inputs with data-setup/run_data_setup.sh, or restore the included data/ files." >&2
exit 1
fi
echo "Model-ready data inputs are present."