Commit Graph

5 Commits

Author SHA1 Message Date
TPTBusiness 127ee0f44f test: Add CLI model selection and logging tests (10 new tests)
- TestCLIModelSelection: 8 tests for predix.py CLI
  * predix module imports
  * fin_quant --model option
  * predix quant --model and --log-file options
  * OpenRouter API key validation
  * TeeWriter existence check
  * health and status commands

- TestLoggingTeeWriter: 2 tests for TeeWriter
  * Multi-stream writing
  * Broken stream handling

All 103 integration tests pass (93 + 10 new).

Also fix predix.py logging:
- Add --log-file flag (default: fin_quant.log)
- TeeWriter writes to both console AND file
- Works for both local and openrouter backends
2026-04-04 08:38:15 +02:00
TPTBusiness d3ae6df454 feat: Add CLI model selection (local vs OpenRouter)
- Add --model/-m flag to select LLM backend
  * local: llama.cpp on localhost (default)
  * openrouter: Cloud models via OpenRouter API
- Create predix.py as new CLI entry point with model selection
- Add OPENROUTER_API_KEY and OPENROUTER_MODEL to .env
- Add health and status commands to CLI
- Update rdagent/app/cli.py with model selection logic

Usage:
  predix quant                    # Local (default)
  predix quant -m openrouter      # OpenRouter cloud
  predix quant -m local -d        # Local + dashboard

Tests: 93 passed
2026-04-04 08:26:48 +02:00
TPTBusiness 30ee6c6221 chore: Remove unnecessary files for v1.0.0 release
Removed:
- Makefile (RD-Agent specific, not fully functional)
- predix.py (duplicates rdagent CLI)
- QWEN.md (internal dev guide - now in .gitignore)
- TODO.md (internal tracking - now in .gitignore)

Kept:
- pyproject.toml (required for pip install)
- start_loop.sh (useful for 24/7 trading)
- data_config.yaml (central configuration)
- start_loop.sh (24/7 trading)

.gitignore updated to exclude internal docs.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-02 21:12:58 +02:00
TPTBusiness b72cca9868 fix: CLI dashboard in separate terminal window
Problem: fin_quant overwrites dashboard output

Solution:
- CLI Dashboard (-c) starts in NEW terminal window
- Web Dashboard (-d) runs parallel in browser
- Both combinable: python predix.py fin_quant -d -c

Supported terminal emulators:
- gnome-terminal
- konsole
- xterm
- tilix

Warning displayed if no terminal is found.
2026-04-02 19:22:22 +02:00
TPTBusiness 757c66cddb feat: predix.py wrapper for dashboard support
Due to Typer CLI caching issues, created a wrapper script
that correctly supports dashboard options.

Usage:
  python predix.py fin_quant              # Normal
  python predix.py fin_quant -d           # Web Dashboard
  python predix.py fin_quant -c           # CLI Dashboard
  python predix.py fin_quant -d -c        # Both
  python predix.py fin_quant --help       # Help

Alternatively still available:
  rdagent fin_quant                       # Original CLI
  ./start_trading.sh                      # Interactive
  ./start_loop.sh                         # Endless loop
2026-04-02 19:21:37 +02:00