#!/usr/bin/env bash # Copy this file and the two Python scripts to Spark; paths are intentionally explicit. set -euo pipefail : "${RECOVERED_SOURCE:?set to code-5056feb/src}" : "${INPUT_CSV:?set to canonical OHLCV CSV}" ROOT=${ROOT:-"$(pwd)"} : "${WRAPPER_COMBO:=$ROOT/required_variants.json}" REQUEST=${REQUEST:-"$ROOT/hs22_full_oracle_request.json"} OUTPUT_DIR=${OUTPUT_DIR:-"$ROOT/hs22_full_oracle_run"} request_args=(--usage-summary "$ROOT/historical_feature_usage_v1_summary.json" --engineering-map "$ROOT/engineering_family_map_v1.json" --input-csv "$INPUT_CSV" --output "$REQUEST") [[ -n "${DEQ_TARGETS:-}" ]] && request_args+=(--deq-targets "$DEQ_TARGETS") python3 "$ROOT/generate_full_historical_oracle_request.py" "${request_args[@]}" run_args=(--request "$REQUEST" --input-csv "$INPUT_CSV" --recovered-source "$RECOVERED_SOURCE" --output-dir "$OUTPUT_DIR" --wrapper-combo "$WRAPPER_COMBO") python3 "$ROOT/run_historical_oracle_overnight.py" "${run_args[@]}"