Aoun-Ai / scripts /test_architecture.py
MuhammadMahmoud's picture
feat: clean deployment with bug fixes and stability improvements
18b8b90
import sys
import asyncio
import traceback
from pathlib import Path
# Add project root to path
sys.path.insert(0, str(Path(__file__).resolve().parent))
async def main():
print("=== Testing All Phases with New Architecture ===")
try:
from app.services.prediction.trainer.trainer import train_advanced_model
print("[+] Prediction Models: ML Trainer module loaded successfully.")
except Exception as e:
print("[-] Phase 1 Error:", e)
try:
from app.services.ocr.ocr_router import ocr_router
from app.services.voice.voice_engine import stt_engine
print("[+] Providers: OCR Router and STT Engine loaded successfully.")
except Exception as e:
print("[-] Phase 2 Error:", e)
try:
from app.services.rag.rag_engine import rag_engine
from app.services.tools.tool_executor import tool_executor
print("[+] AI Services: RAG Engine & Tool Executor loaded successfully.")
except Exception as e:
print("[-] Phase 3 Error:", e)
try:
from app.services.feedback.feedback_store import feedback_store
from app.core.audit_logger import audit_logger
from app.services.document.document_analyzer import document_analyzer
print("[+] Audit & Feedback: Feedback Store & Audit Logger initialized successfully.")
except Exception as e:
print("[-] Phase 4 Error:", e)
if __name__ == "__main__":
asyncio.run(main())