cleanup: 去冗余+归档一次性脚本
- 移除重复的系统健康检查-每日(no_agent版,与LLM版重叠) - 归档42个一次性脚本(移出MoFin/scripts→archive/scripts): - fix_*: 历史数据修复(11个) - migrate_*/rollback_*: 数据迁移(2个) - 一次性数据修复: bulk/close/data_freshness等(16个) - check_*/verify_*/diagnose_*: 历史诊断工具(12个) - test_*: 测试脚本(3个) - 84个活跃脚本, 0架构违规, 31张healthy数据表
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""Quick verification after JSON→DB migration"""
|
||||
import sys
|
||||
sys.path.insert(0, '/home/hmo/MoFin')
|
||||
|
||||
from mo_data import read_portfolio, read_decisions, read_watchlist
|
||||
|
||||
ok = 0
|
||||
err = 0
|
||||
|
||||
for name, fn in [("portfolio", read_portfolio), ("decisions", read_decisions), ("watchlist", read_watchlist)]:
|
||||
try:
|
||||
r = fn()
|
||||
if name == "portfolio":
|
||||
n = len(r.get('holdings', []))
|
||||
elif name == "decisions":
|
||||
n = len(r.get('decisions', []))
|
||||
else:
|
||||
n = len(r.get('stocks', []))
|
||||
print(f" {name}: {n} records OK")
|
||||
ok += 1
|
||||
except Exception as e:
|
||||
print(f" {name}: ERROR -> {e}")
|
||||
err += 1
|
||||
|
||||
print(f"\n{ok}/3 passed, {err} errors")
|
||||
Reference in New Issue
Block a user