From 407389946e933f56194c6c7b3497aa709eda8e52 Mon Sep 17 00:00:00 2001 From: xxm Date: Fri, 21 Aug 2026 03:21:50 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E6=97=A7?= =?UTF-8?q?=E8=AF=84=E4=BC=B0tab+evolution=E8=B7=AF=E7=94=B1,=E7=A0=94?= =?UTF-8?q?=E7=A9=B6tab=E6=94=B9=E7=94=A8effectiveness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除评估tab(旧功能被strategy_effectiveness替代) - 移除evolution API路由(引用已删除的evolution目录) - 移除旧evaluation/stats/accuracy路由 - 研究tab: 策略自我进化→改为读取effectiveness/summary - effectivenes.html仍可通过直链访问 --- server.py | 61 ----------------------------------------------- static/index.html | 3 +-- 2 files changed, 1 insertion(+), 63 deletions(-) diff --git a/server.py b/server.py index 07e24df7..0fe022ad 100644 --- a/server.py +++ b/server.py @@ -1587,37 +1587,8 @@ def confirm_advice(): # ── 准确率统计API ── -@app.route("/api/stats/accuracy") -def get_accuracy_stats(): - data = _load_json(DATA_DIR / "accuracy_stats.json", {}) - return jsonify(data) - # ── 策略评估API ── -@app.route("/api/evaluation") -def get_evaluation(): - """返回所有策略的双维度评估结果""" - # 主数据源:evaluation.json - eval_data = _load_json(DATA_DIR / "evaluation.json", {}) - strategies = eval_data.get("strategies", []) - if strategies: - return jsonify(strategies) - - # 备选:从 decisions.json 的 evaluation 字段读取(尚未反写时的兼容) - decisions = read_decisions() - evals = [] - for d in decisions.get("decisions", []): - e = d.get("evaluation", []) - if e: - evals.append({ - "code": d["code"], - "name": d["name"], - "type": d.get("type", ""), - "current": d.get("current", ""), - "evaluations": e, - }) - return jsonify(evals) - @app.route("/api/evaluation/trigger", methods=["POST"]) def trigger_evaluation(): @@ -2280,16 +2251,6 @@ def api_research_log(): return jsonify({"log": [], "error": str(e)}) -@app.route("/api/evolution/dashboard") -def api_evolution_dashboard(): - """进化模块 Dashboard""" - try: - sys.path.insert(0, '/home/hmo/MoFin/evolution') - from evolution_api import get_evolution_dashboard - return jsonify(get_evolution_dashboard()) - except Exception as e: - return jsonify({'error': str(e)}), 500 - @app.route("/api/evolution/merge_b_group", methods=["POST"]) def api_evolution_merge_b_group(): @@ -2306,28 +2267,6 @@ def api_evolution_merge_b_group(): return jsonify({"error": str(e)}), 500 -@app.route("/api/evolution/health_trend") -def api_evolution_health_trend(): - """健康度趋势""" - try: - version = request.args.get('version', 'v_next4') - days = int(request.args.get('days', 30)) - sys.path.insert(0, '/home/hmo/MoFin/evolution') - from evolution_api import get_health_trend - return jsonify({'trend': get_health_trend(version, days)}) - except Exception as e: - return jsonify({'error': str(e)}), 500 - - -@app.route("/api/evolution/combo") -def api_evolution_combo(): - """组合方案 Dashboard (v_next4+v_mr regime分工 + v_combo回测)""" - try: - sys.path.insert(0, '/home/hmo/MoFin/evolution') - from evolution_api import get_combo_dashboard - return jsonify(get_combo_dashboard()) - except Exception as e: - return jsonify({'error': str(e)}), 500 # ── 📚 文档 Tab 端点(2026-08-11 新增,开源项目式文档体系)── diff --git a/static/index.html b/static/index.html index bd30f83c..88db2cbe 100644 --- a/static/index.html +++ b/static/index.html @@ -109,7 +109,7 @@ body { background: #0f0f13; color: #e2e8f0; } - + @@ -123,7 +123,6 @@ body { background: #0f0f13; color: #e2e8f0; }
-