Commit Graph

4 Commits

Author SHA1 Message Date
Joseph O'Brien c39f9aab36 Add pre-commit hooks and ruff code quality configuration
- Add .pre-commit-config.yaml with trailing whitespace, ruff linter/formatter
- Configure ruff in pyproject.toml with selected rules (E, F, W, I, UP, B, C4, SIM)
- Add F401 to unfixable to preserve re-exported imports in __init__.py files
- Fix BacktestMetrics import in backtesting/engine.py
- Update todos.md with enhanced trade discovery and database implementation tasks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 11:22:13 -05:00
Joseph O'Brien 1346e20b5e feat: create enums for status strings
Added AgentStatus enum for CLI agent tracking (pending, in_progress,
completed, error) and BacktestStatus enum for backtest results (pending,
running, completed, failed). Replaces string literals with type-safe
enum values throughout the codebase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 04:13:59 -05:00
Joseph O'Brien b8be981bc8 feat: add type hints to function signatures across codebase
Added return type hints and parameter type hints to functions in:
- tradingagents/graph/trading_graph.py
- tradingagents/graph/reflection.py
- tradingagents/dataflows/y_finance.py
- tradingagents/dataflows/local.py
- tradingagents/backtesting/engine.py
- cli/analysis.py, cli/discovery.py, cli/display.py, cli/state.py, cli/backtest_cmd.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 03:50:49 -05:00
Joseph O'Brien 293df9c552 refactor: split cli/main.py into modular components
Extract cli/main.py (1916 lines) into focused modules:
- cli/state.py: MessageBuffer class for state management
- cli/display.py: Layout, progress tables, and report display functions
- cli/discovery.py: Trending stock discovery flow and UI
- cli/analysis.py: Stock analysis flow and chunk processing
- cli/backtest_cmd.py: Backtesting command and strategies

main.py reduced from 1916 to 110 lines, serving as entry point only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 03:29:42 -05:00