feat: 23:00 daily news recap; prompts drop futures
Summarizer still runs the 15-min analyst, plus a 24h breaking-news recap at 23:00 America/New_York. HUD pins kind=daily_recap. Prompts ignore futures/market tape.
This commit is contained in:
parent
d25ca8ed9c
commit
49ee5fe7a3
16 changed files with 431 additions and 75 deletions
32
news/summerizer/tests/test_prompts.py
Normal file
32
news/summerizer/tests/test_prompts.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"""Default prompts: breaking news, ignore futures/market tape."""
|
||||
|
||||
from summarizer import MAP_PROMPT_DEFAULT, RECAP_PROMPT_DEFAULT, SUMMARY_PROMPT_DEFAULT
|
||||
|
||||
|
||||
def _assert_breaking_not_futures(prompt: str) -> None:
|
||||
p = prompt.lower()
|
||||
assert "breaking" in p
|
||||
assert "futures" in p
|
||||
assert "ignore" in p or "do not" in p or "not" in p
|
||||
assert "es=f" not in p
|
||||
assert "yfinance" not in p
|
||||
|
||||
|
||||
def test_map_prompt_focuses_on_breaking_news_not_futures():
|
||||
_assert_breaking_not_futures(MAP_PROMPT_DEFAULT)
|
||||
|
||||
|
||||
def test_summary_prompt_focuses_on_breaking_news_not_futures():
|
||||
_assert_breaking_not_futures(SUMMARY_PROMPT_DEFAULT)
|
||||
p = SUMMARY_PROMPT_DEFAULT.lower()
|
||||
assert "commodity" in p or "market" in p
|
||||
|
||||
|
||||
def test_recap_prompt_is_daily_24h_breaking_news():
|
||||
p = RECAP_PROMPT_DEFAULT.lower()
|
||||
_assert_breaking_not_futures(RECAP_PROMPT_DEFAULT)
|
||||
assert "daily" in p
|
||||
assert "24" in p
|
||||
assert "summary_en" in p
|
||||
assert "ticker" in p
|
||||
assert "map_items" in p
|
||||
Loading…
Reference in a new issue