-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefresh_data.py
More file actions
26 lines (17 loc) · 745 Bytes
/
Copy pathrefresh_data.py
File metadata and controls
26 lines (17 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from __future__ import annotations
import argparse
import sys
from pathlib import Path
from dotenv import load_dotenv
from src.pipeline import run_pipeline
def main() -> int:
load_dotenv()
parser = argparse.ArgumentParser(description="Refresh MARA mNAV dashboard data.")
parser.add_argument("--days", type=int, default=None, help="How many days of history to fetch.")
parser.add_argument("--output", type=Path, default=None, help="Optional output JSON path.")
args = parser.parse_args()
result = run_pipeline(days=args.days, output_path=args.output)
print(f"Saved {result.row_count} rows to {result.output_path} at {result.generated_at}")
return 0
if __name__ == "__main__":
raise SystemExit(main())