fix(dataflows): serve a past run financial statements only with a known filing date

- Yahoo and Alpha Vantage statements, dated by the period they cover, are withheld from a run dated in the past, with a notice saying why
- statements come from SEC EDGAR by default (fundamental_data "sec_edgar,yfinance"), so a past run reads US filers as filed
This commit is contained in:
Yijia-Xiao
2026-09-29 05:57:18 +00:00
parent 1d92269d35
commit d7ac9461da
9 changed files with 119 additions and 99 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ class DataflowsConfigIsolationTests(unittest.TestCase):
fresh = get_config()
self.assertEqual(fresh["data_vendors"]["core_stock_apis"], "alpha_vantage")
self.assertEqual(fresh["data_vendors"]["technical_indicators"], "yfinance")
self.assertEqual(fresh["data_vendors"]["fundamental_data"], "yfinance")
self.assertEqual(fresh["data_vendors"]["fundamental_data"], "sec_edgar,yfinance")
self.assertEqual(fresh["data_vendors"]["news_data"], "yfinance")
def test_nested_dict_updates_merge_one_level_deep(self):
@@ -95,7 +95,7 @@ def test_a_run_reads_its_own_graphs_vendors_not_the_last_graph_built():
set_config(first) # graph A is built
second = _graph(copy.deepcopy(default_config.DEFAULT_CONFIG))
assert _vendors_seen_by_a_run(second) == ["yfinance"]
assert _vendors_seen_by_a_run(second) == ["sec_edgar,yfinance"]
@pytest.mark.unit