chore: remove dead functions and write-only state (no behaviour change)
Zero callers anywhere (tests included), verified by grep/AST: - dashboard_publisher.DashboardPublisher.publish_all (run_cycle inlines both publishes) - signal_log.SignalLogger.advance_with_bars (the backfill script uses backfill_seeds / resolve_from_store / reseed_unresolvable) and the never-read SignalLogger.path property plus its write-only self._path - llm_client.reset_llm_client (tests reset the singleton by assignment) - market_outlook._last_run_ts, residue of the old "now - last < 3600" dedup; _last_run_hour (the UTC hour bucket) is the live key - news_engine FundamentalContext.event_impact_on_pairs: written once, read by nothing; its only feeder NewsEngine._get_affected_pairs and that helper's unit test go with it - position_sizing.LIVE_DEPTH_BARS (referenced only by its own docstring, which now states the depths inline), the unused Iterable import and the unused atr_ok parameter of _fill_geometry - analyze_signal_log: unused `field` import and the unused `rows` parameter of persona_scorecard / news_outcome_buckets (both read the DB directly) The two backfill/label scripts' --db help text now names the config.json setting it actually falls back to. Suite: 463 passed, 0 failed (one test removed with its subject). Claude-Session: https://claude.ai/code/session_0156YhogLytzj9P2iH1skGbL
This commit is contained in:
+2
-14
@@ -881,18 +881,6 @@ def _():
|
||||
assert NewsEngine._parse_rss_date("not-a-date") is None
|
||||
|
||||
|
||||
@test("NewsEngine._get_affected_pairs")
|
||||
def _():
|
||||
pairs = NewsEngine._get_affected_pairs("USD")
|
||||
assert "XAU/USD" in pairs
|
||||
|
||||
pairs_xau = NewsEngine._get_affected_pairs("XAU")
|
||||
assert "XAU/USD" in pairs_xau
|
||||
|
||||
pairs_unknown = NewsEngine._get_affected_pairs("ARS")
|
||||
assert pairs_unknown == []
|
||||
|
||||
|
||||
@test("EconomicEvent properties")
|
||||
def _():
|
||||
future_time = datetime.now(timezone.utc) + timedelta(minutes=30)
|
||||
@@ -8174,7 +8162,7 @@ def _():
|
||||
"stance": "support"}])))
|
||||
con.commit()
|
||||
con.close()
|
||||
buckets = asl.news_outcome_buckets(rows, events, path)
|
||||
buckets = asl.news_outcome_buckets(events, path)
|
||||
finally:
|
||||
os.remove(path)
|
||||
assert sum(b["n"] for b in buckets) == 3
|
||||
@@ -9117,7 +9105,7 @@ def _():
|
||||
ev = _types.SimpleNamespace(
|
||||
rows=[_types.SimpleNamespace(id=1), _types.SimpleNamespace(id=2)],
|
||||
r_headline=2.0)
|
||||
out = asl.persona_scorecard([], [ev], path)
|
||||
out = asl.persona_scorecard([ev], path)
|
||||
assert len(out) == 1, out
|
||||
assert out[0]["n"] == 1, f"two rows of ONE event must count once: {out}"
|
||||
assert out[0]["mean_r"] == 2.0
|
||||
|
||||
Reference in New Issue
Block a user