refactor(cli): split the interactive choices and the run loop out of cli/main.py

- selections.py asks what to run; run.py builds the graph, streams it to the live view and saves the report
- main.py keeps the Typer app and its two commands
This commit is contained in:
Yijia-Xiao
2026-09-24 05:00:36 +00:00
parent 56bd98f690
commit 4a30cb1c0a
11 changed files with 846 additions and 830 deletions
+4 -5
View File
@@ -17,12 +17,11 @@ class TickerSymbolHandlingTests(unittest.TestCase):
self.assertIn("exchange suffix", context)
def test_single_get_ticker_no_shadow(self):
# Regression: cli/main.py had a duplicate get_ticker with an empty
# questionary prompt (rendered as a bare "?") that shadowed the
# descriptive one in cli/prompts. Keep a single canonical definition.
import cli.main
# A second get_ticker with an empty prompt (a bare "?") once shadowed
# the descriptive one; the selection flow must use the one in prompts.
import cli.prompts
self.assertIs(cli.main.get_ticker, cli.prompts.get_ticker)
import cli.selections
self.assertIs(cli.selections.get_ticker, cli.prompts.get_ticker)
if __name__ == "__main__":