fix(data): verify_akshare_e2e 修正事件类路径(data/static/<type> 非 events/)
akshare_static_download 全类型(含 per-date 龙虎榜/大宗/两融/解禁 + per-period 预告/快报) 都落 data/static/<type>/, 非 data/events/; 合并为单一 static 检查(13 类型)
This commit is contained in:
@@ -14,10 +14,13 @@ sys.stdout.reconfigure(line_buffering=True)
|
|||||||
BASE = Path(r"C:\sanguo_vnpy_v2\data")
|
BASE = Path(r"C:\sanguo_vnpy_v2\data")
|
||||||
ok, warn = [], []
|
ok, warn = [], []
|
||||||
|
|
||||||
# 1. static/ 各表文件数 + 最新 mtime
|
# 1. static/ 各表文件数 + 最新 mtime (akshare_static_download 全部类型都落 data/static/<type>/)
|
||||||
print("===== static/ 各表 =====")
|
# per-stock(估值/三表/摘要/北向/股本/十大股东) + per-date(龙虎榜/大宗/两融/解禁) + per-period(预告/快报)
|
||||||
|
print("===== static/ 各表 (akshare 全类型) =====")
|
||||||
for sub in ["valuation", "financial_abstract", "balance", "income", "cashflow",
|
for sub in ["valuation", "financial_abstract", "balance", "income", "cashflow",
|
||||||
"northbound", "share_capital", "top_holders"]:
|
"northbound", "share_capital", "top_holders",
|
||||||
|
"dragon_tiger", "block_trade", "margin_sse", "restricted",
|
||||||
|
"forecast", "express"]:
|
||||||
d = BASE / "static" / sub
|
d = BASE / "static" / sub
|
||||||
if not d.exists():
|
if not d.exists():
|
||||||
warn.append(f"static/{sub} MISSING")
|
warn.append(f"static/{sub} MISSING")
|
||||||
@@ -33,20 +36,7 @@ for sub in ["valuation", "financial_abstract", "balance", "income", "cashflow",
|
|||||||
print(f" {sub}: {len(fs)} parquet, latest={latest}")
|
print(f" {sub}: {len(fs)} parquet, latest={latest}")
|
||||||
ok.append(f"static/{sub}")
|
ok.append(f"static/{sub}")
|
||||||
|
|
||||||
# 2. events/ per-date 类
|
# 2. constituent_unified + _old (akshare 全类型已在 section 1 的 static/ 检查覆盖)
|
||||||
print("\n===== events/ per-date 类 =====")
|
|
||||||
for sub in ["dragon_tiger", "block_trade", "margin_sse", "restricted"]:
|
|
||||||
d = BASE / "events" / sub
|
|
||||||
if not d.exists():
|
|
||||||
warn.append(f"events/{sub} MISSING(ak-events 未跑或当日无数据)")
|
|
||||||
print(f" {sub}: MISSING")
|
|
||||||
continue
|
|
||||||
fs = list(d.glob("*.parquet"))
|
|
||||||
print(f" {sub}: {len(fs)} parquet")
|
|
||||||
if fs:
|
|
||||||
ok.append(f"events/{sub}")
|
|
||||||
|
|
||||||
# 3. constituent_unified + _old
|
|
||||||
print("\n===== constituent_unified + _old =====")
|
print("\n===== constituent_unified + _old =====")
|
||||||
c = sqlite3.connect(str(BASE / "quant_trading.db"), timeout=60)
|
c = sqlite3.connect(str(BASE / "quant_trading.db"), timeout=60)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user