Commit Graph

15 Commits

Author SHA1 Message Date
Andrew Kaszubski d3892b0da9 feat(db): add User model fields for tax, timezone, API key - Fixes #3 2025-12-26 13:15:37 +11:00
Andrew Kaszubski 9933a929df feat(api): add FastAPI backend with JWT auth and strategies endpoint (#48)
- Add FastAPI application with async/await support (tradingagents/api/)
- Implement JWT authentication with Argon2 password hashing (PyJWT, pwdlib)
- Create /api/v1/auth/login endpoint for user authentication
- Create /api/v1/strategies CRUD endpoints (list, create, get, update, delete)
- Add SQLAlchemy 2.0 async models (User, Strategy) with PostgreSQL/SQLite
- Add Alembic migrations for database schema management
- Add comprehensive test suite (208 tests in tests/api/)
- Add Pydantic schemas for request/response validation
- Add CORS and error handling middleware
- Update documentation (CHANGELOG.md, README.md)

Security: Argon2 password hashing, JWT expiration, user isolation,
SQL injection prevention via SQLAlchemy ORM, no hardcoded secrets

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 11:50:03 +11:00
Andrew Kaszubski e5575250df feat(tests): add UAT and evaluation tests for agent outputs - Fixes #53
- Created tradingagents/utils/output_validator.py with ValidationResult dataclass

- Added validate_report_completeness(), validate_decision_quality() for content validation

- Added validate_debate_state(), validate_agent_state() for state coherence

- Created tests/unit/test_output_validators.py with 54 unit tests

- Created tests/e2e/test_uat_agent_outputs.py with 23 UAT scenarios

- Added agent state fixtures to tests/conftest.py (sample_agent_state, debates)

- Total: 77 tests covering report quality, signal extraction, and state integrity

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 11:38:37 +11:00
Andrew Kaszubski b4653ca37b feat(tests): add test fixtures directory with mock data - Fixes #51
- Created tests/fixtures/ with FixtureLoader class (14 loader methods)

- Added stock_data fixtures: US, CN (with Chinese columns), standardized OHLCV

- Added metadata fixtures: 5 analysis examples with datetime parsing

- Added report_sections fixtures: 7 complete analyst report sections

- Added api_responses fixtures: OpenAI embeddings and error responses

- Added configurations fixtures: vendor and LLM provider configs

- Created comprehensive README.md (595 lines) documenting fixture usage

- Updated docs/testing/writing-tests.md with fixture examples

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 11:23:29 +11:00
Andrew Kaszubski 5ea9e905c5 feat(tests): restructure tests into unit/integration/e2e directories - Fixes #50
- Moved 5 unit tests to tests/unit/ (exceptions, logging, report, docs, conftest)

- Moved 4 integration tests to tests/integration/ (openrouter, akshare, cli, deepseek)

- Created tests/e2e/ directory with README.md and conftest.py placeholder

- Added pytestmark = pytest.mark.unit/integration to all test files

- Updated pytest.ini with testpaths for new structure

- Updated docs/testing/README.md with new directory structure

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 11:04:20 +11:00
Andrew Kaszubski d6b9df162e feat(dataflows): add AKShare data vendor for US and Chinese stock data (Issue #16) 2025-12-26 10:42:15 +11:00
Andrew Kaszubski 36de8f0470 feat(tests): add pytest conftest.py hierarchy with shared fixtures - Fixes #49
- Created tests/conftest.py with 12 shared fixtures (environment mocks, LangChain/ChromaDB mocking, configuration)

- Created tests/unit/conftest.py with 6 unit-specific fixtures (data vendors, sample data)

- Created tests/integration/conftest.py with 2 integration fixtures (live ChromaDB, temp dirs)

- Added pytest.ini with 7 custom markers (unit, integration, e2e, llm, chromadb, slow, requires_api_key)

- Added tests/test_conftest_hierarchy.py with 83 tests validating fixture infrastructure

- Updated docs/testing/README.md and writing-tests.md with fixture usage documentation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 10:40:30 +11:00
Andrew Kaszubski c0dfb21c00 feat(docs): add comprehensive documentation structure - Fixes #52
- Add docs/ directory with 17 documentation files

- Architecture: multi-agent-system, data-flow, llm-integration

- API Reference: trading-graph, agents, dataflows

- Guides: adding-new-analyst, adding-llm-provider, adding-data-vendor, configuration

- Testing: README, running-tests, writing-tests

- Development: setup, contributing

- Update PROJECT.md with TESTING STRATEGY requirements

- Add test_documentation_structure.py for validation

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 10:18:50 +11:00
Andrew Kaszubski 436f6cc092 feat(reports): add report exporter with YAML frontmatter and JSON metadata (Issue #21) 2025-12-26 10:11:42 +11:00
Andrew Kaszubski bb0ea33100 feat(logging): add dual-output logging and rate limit error handling - Fixes #39 2025-12-26 09:54:07 +11:00
Andrew Kaszubski 9ee81be48b fix(memory): use get_or_create_collection for idempotent ChromaDB init - Fixes #30 2025-12-26 09:20:04 +11:00
Andrew Kaszubski 164cb0d2fc fix(tests): add mock_env_openrouter fixture to all OpenRouter tests
- Add mock_env_openrouter to tests that use openrouter_config
- Update API key validation tests to expect ValueError when OPENROUTER_API_KEY missing
- All 30 tests now pass

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 16:02:04 +11:00
Andrew Kaszubski 5443aaa209 feat(llm): add OpenRouter API support with proper headers and API key handling
- Add explicit OPENROUTER_API_KEY environment variable handling
- Add HTTP-Referer and X-Title headers for OpenRouter attribution
- Fix case sensitivity for provider names (ollama now case-insensitive)
- Add embedding fallback to OpenAI when using OpenRouter (since OpenRouter lacks embedding API)
- Add comprehensive test suite (30 tests) for OpenRouter integration
- Update README.md and PROJECT.md with OpenRouter configuration docs
- Add CHANGELOG.md documenting the changes

Patterns borrowed from ~/.claude/lib/genai_validate.py for multi-provider support.

Closes #1

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 15:51:25 +11:00
Yijia Xiao 26c5ba5a78
Revert "Docker support and Ollama support (#47)" (#57)
This reverts commit 78ea029a0b.
2025-06-26 00:07:58 -04:00
Geeta Chauhan 78ea029a0b
Docker support and Ollama support (#47)
- Added support for running CLI and Ollama server via Docker
- Introduced tests for local embeddings model and standalone Docker setup
- Enabled conditional Ollama server launch via LLM_PROVIDER
2025-06-25 23:57:05 -04:00