File size: 965 Bytes
2b21f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
# Copies the latest export_dashboard_data.py output into space/data/, which is what
# app.py actually reads (and what gets committed to the HF Space git repo).
# outputs/ stays gitignored/transient; space/data/ is the committed snapshot.
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
SRC="$PROJECT_ROOT/outputs/dashboard"
DST="$SCRIPT_DIR/data"

if [ ! -d "$SRC" ]; then
    echo "No export found at $SRC — run: python -m src.evaluation.export_dashboard_data" >&2
    exit 1
fi

mkdir -p "$DST/calls"
cp "$SRC"/sentiment_ladder.json "$SRC"/volatility_ladder.json "$SRC"/calls_index.json "$SRC"/methodology.json \
   "$SRC"/companies.json "$SRC"/company_summary.json "$DST/"
cp "$SRC"/calls/*.json "$DST/calls/"
cp "$PROJECT_ROOT/data/processed/ticker_names.csv" "$DST/ticker_names.csv"

echo "Synced $(ls "$DST/calls" | wc -l | tr -d ' ') call detail files to $DST"