Commit Graph

42 Commits

Author SHA1 Message Date
357e561b1f refactor: remove batch mode, simplify to API-only deployment
Removes dual-mode deployment complexity, focusing on REST API service only.

Changes:
- Removed batch mode from docker-compose.yml (now single ai-trader service)
- Deleted scripts/test_batch_mode.sh validation script
- Renamed entrypoint-api.sh to entrypoint.sh (now default)
- Simplified Dockerfile (single entrypoint, removed CMD)
- Updated validation scripts to use 'ai-trader' service name
- Updated documentation (README.md, TESTING_GUIDE.md, CHANGELOG.md)

Benefits:
- Eliminates port conflicts between batch and API services
- Simpler configuration and deployment
- API-first architecture aligned with Windmill integration
- Reduced maintenance complexity

Breaking Changes:
- Batch mode no longer available
- All simulations must use REST API endpoints
2025-10-31 13:54:14 -04:00
fb9583b374 feat: transform to REST API service with SQLite persistence (v0.3.0)
Major architecture transformation from batch-only to API service with
database persistence for Windmill integration.

## REST API Implementation
- POST /simulate/trigger - Start simulation jobs
- GET /simulate/status/{job_id} - Monitor job progress
- GET /results - Query results with filters (job_id, date, model)
- GET /health - Service health checks

## Database Layer
- SQLite persistence with 6 tables (jobs, job_details, positions,
  holdings, reasoning_logs, tool_usage)
- Foreign key constraints with cascade deletes
- Replaces JSONL file storage

## Backend Components
- JobManager: Job lifecycle management with concurrency control
- RuntimeConfigManager: Thread-safe isolated runtime configs
- ModelDayExecutor: Single model-day execution engine
- SimulationWorker: Date-sequential, model-parallel orchestration

## Testing
- 102 unit and integration tests (85% coverage)
- Database: 98% coverage
- Job manager: 98% coverage
- API endpoints: 81% coverage
- Pydantic models: 100% coverage
- TDD approach throughout

## Docker Deployment
- Dual-mode: API server (persistent) + batch (one-time)
- Health checks with 30s interval
- Volume persistence for database and logs
- Separate entrypoints for each mode

## Validation Tools
- scripts/validate_docker_build.sh - Build validation
- scripts/test_api_endpoints.sh - Complete API testing
- scripts/test_batch_mode.sh - Batch mode validation
- DOCKER_API.md - Deployment guide
- TESTING_GUIDE.md - Testing procedures

## Configuration
- API_PORT environment variable (default: 8080)
- Backwards compatible with existing configs
- FastAPI, uvicorn, pydantic>=2.0 dependencies

Co-Authored-By: AI Assistant <noreply@example.com>
2025-10-31 11:47:10 -04:00
a4bc4fd0de fix: update repository URLs to Xe138/AI-Trader fork
Update all GitHub URLs in README from HKUDS/AI-Trader to
Xe138/AI-Trader including:
- Clone URLs (2 locations)
- Support & Community links (Discussions, Issues)
- Badge URLs (stars, forks)
2025-10-30 21:06:28 -04:00
6af1808c2f Add Docker deployment section to README
Include quick start with Docker Compose
Add pre-built image usage instructions
Link to detailed Docker documentation
2025-10-30 18:44:04 -04:00
tianyufan
d30fb072bd update README 2025-10-30 10:57:22 +08:00
tianyufan
2c5072f66f update python version 2025-10-29 21:33:46 +08:00
tianyufan
53a5e5c46d update leadboard 2025-10-29 12:19:24 +08:00
chaohuang-ai
9a52263d74 Update README.md 2025-10-29 01:22:31 +08:00
chaohuang-ai
a2173cf1c9 Update README.md 2025-10-29 00:08:34 +08:00
tianyufan
8a3445d9f8 update README 2025-10-28 21:27:23 +08:00
tianyufan
beb8d7b393 update Disclaimer 2025-10-28 15:33:47 +08:00
tianyufan
1a41923ece update leaderboard 2025-10-28 11:46:58 +08:00
tianyufan
825e89858c Merge branch 'main' of https://github.com/HKUDS/AI-Trader 2025-10-28 11:43:56 +08:00
tianyufan
a27838a1fc update leaderboard 2025-10-28 11:42:52 +08:00
chaohuang-ai
4ae1818467 Update README.md 2025-10-28 11:35:08 +08:00
tianyufan
49723c2b5e update TODO 2025-10-27 21:43:34 +08:00
tianyufan
3cfd89dd93 update README 2025-10-25 22:03:34 +08:00
tianyufan
2a0b3c986e update readme 2025-10-24 23:04:50 +08:00
tianyufan
9455ee7944 update README 2025-10-24 23:02:22 +08:00
ZzMeei
6e5cc56e44 upload communication 2025-10-24 16:44:57 +08:00
chaohuang-ai
2be115206a Update README.md 2025-10-24 11:42:50 +08:00
chaohuang-ai
928cc88c63 Update README.md 2025-10-24 10:06:24 +08:00
chaohuang-ai
d607114bc2 Update README.md 2025-10-24 03:17:31 +08:00
chaohuang-ai
cf50505868 Update README.md 2025-10-24 03:16:31 +08:00
chaohuang-ai
a7458d88f8 Update README.md 2025-10-24 03:13:48 +08:00
chaohuang-ai
1f6478ac0e Update README.md 2025-10-24 03:13:06 +08:00
chaohuang-ai
6fb0ed8dc3 Update README.md 2025-10-24 02:52:16 +08:00
tianyufan
bd01a477ef update link 2025-10-24 02:35:13 +08:00
tianyufan
4997a3ba62 Merge branch 'main' of https://github.com/HKUDS/AI-Trader 2025-10-24 02:26:58 +08:00
chaohuang-ai
e544ac1d97 Update README.md 2025-10-24 02:25:40 +08:00
tianyufan
d1971234bc update data and assets 2025-10-24 02:24:26 +08:00
chaohuang-ai
0ba30bbcf8 Update README.md 2025-10-24 02:23:43 +08:00
chaohuang-ai
46af2f056a Update README.md 2025-10-24 02:13:21 +08:00
chaohuang-ai
289c07935d Update README.md 2025-10-24 02:08:19 +08:00
chaohuang-ai
e6478c3704 Update README.md 2025-10-24 02:07:42 +08:00
chaohuang-ai
e4ee3e7fee Update README.md 2025-10-24 02:07:00 +08:00
tianyufan
3a3938ea58 updateREADME 2025-10-24 02:05:02 +08:00
tianyufan
ab9acd078c update 2025-10-24 01:52:47 +08:00
tianyufan
7b2b91120b update readme 2025-10-24 01:46:51 +08:00
tianyufan
cf47ce1105 update README 2025-10-24 01:45:32 +08:00
tianyufan
c6cbaca0d7 update data 2025-10-24 01:43:23 +08:00
tianyufan
df5c25c98d init update 2025-10-24 00:35:21 +08:00