Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions harness/config/tech-hotspot-radar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fetch:
sleep_between_requests_seconds: 3
min_source_interval_hours: 6
user_agent: Solar-Tech-Hotspot-Radar/1.0 (+local knowledge capture)
github_token_env: GITHUB_TOKEN

# ── YouTube source ──────────────────────────────────────────────────
youtube:
Expand Down
19 changes: 18 additions & 1 deletion harness/scripts/run_tech_hotspot_radar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -uo pipefail

HARNESS_DIR="${HARNESS_DIR:-/Users/lisihao/Solar/harness}"
export HOME="${HOME:-/Users/lisihao}"
PYTHON="${PYTHON:-python3}"
CONFIG="${CONFIG:-$HARNESS_DIR/config/tech-hotspot-radar.yaml}"
DB="${DB:-/Users/lisihao/.solar/harness/state/tech-hotspot-radar/tech-hotspot-radar.sqlite}"
Expand Down Expand Up @@ -42,6 +43,20 @@ run_step() {
}

echo "Running Tech Hotspot Radar collectors at $(date)"
if [[ -z "${GITHUB_TOKEN:-}" ]] && command -v gh >/dev/null 2>&1; then
if GH_TOKEN_VALUE="$(gh auth token 2>/dev/null)" && [[ -n "$GH_TOKEN_VALUE" ]]; then
export GITHUB_TOKEN="$GH_TOKEN_VALUE"
unset GH_TOKEN_VALUE
echo "[github-auth] using gh auth token"
else
unset GH_TOKEN_VALUE
echo "[github-auth] warn: no GITHUB_TOKEN and gh auth token unavailable; GitHub API will be unauthenticated" >&2
fi
elif [[ -n "${GITHUB_TOKEN:-}" ]]; then
echo "[github-auth] using GITHUB_TOKEN"
else
echo "[github-auth] warn: no GITHUB_TOKEN; GitHub API will be unauthenticated" >&2
fi

run_step "hf-trending" \
"${RADAR[@]}" collect-hf-papers --period all --limit 80 --force "$@"
Expand All @@ -56,7 +71,9 @@ run_step "hf-daily-baseline ${START_UTC}..${TODAY_UTC}" \
--force "$@"

run_step "hf-paper-insights" \
"${RADAR[@]}" materialize-hf-paper-insights --limit "${HF_INSIGHT_LIMIT:-160}" "$@"
"${RADAR[@]}" materialize-hf-paper-insights \
--limit "${HF_INSIGHT_LIMIT:-160}" \
--sleep-seconds "${HF_INSIGHT_SLEEP_SECONDS:-0.5}" "$@"

run_step "github" \
"${RADAR[@]}" collect-github --limit-repos "${GITHUB_LIMIT_REPOS:-80}" --force "$@"
Expand Down
Loading