-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_installation.py
More file actions
111 lines (84 loc) · 2.85 KB
/
test_installation.py
File metadata and controls
111 lines (84 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python3
"""
Test script to verify all dependencies are installed correctly
"""
def test_imports():
"""Test that all required modules can be imported"""
print("Testing imports...")
try:
# Core trading dependencies
import hyperliquid
print("✅ hyperliquid-python-sdk")
import web3
print("✅ web3")
import aiohttp
print("✅ aiohttp")
import openai
print("✅ openai")
import requests
print("✅ requests")
# GUI dependencies
import nicegui
print("✅ nicegui")
import plotly
print("✅ plotly")
import pandas
print("✅ pandas")
try:
import pywebview
print("✅ pywebview")
except ImportError:
print("⚠️ pywebview (optional - for native desktop mode)")
# Database
import sqlalchemy
print("✅ sqlalchemy")
# Utilities
from dotenv import load_dotenv
print("✅ python-dotenv")
print("\n🎉 All dependencies imported successfully!")
return True
except ImportError as e:
print(f"❌ Import error: {e}")
return False
def test_config():
"""Test configuration loading"""
print("\nTesting configuration...")
try:
from src.backend.config_loader import CONFIG
print("✅ Configuration loaded")
# Check if .env file exists
import os
if os.path.exists('.env'):
print("✅ .env file found")
else:
print("⚠️ .env file not found - you'll need to configure API keys")
return True
except Exception as e:
print(f"❌ Configuration error: {e}")
return False
def test_database():
"""Test database initialization"""
print("\nTesting database...")
try:
from src.database.db_manager import DatabaseManager
# Test database creation
db = DatabaseManager()
print("✅ Database manager initialized")
return True
except Exception as e:
print(f"❌ Database error: {e}")
return False
if __name__ == "__main__":
print("⚡ Testing QuantumAlpha Capital Platform Installation\n")
success = True
success &= test_imports()
success &= test_config()
success &= test_database()
if success:
print("\n🎉 Installation test completed successfully!")
print("\nNext steps:")
print("1. Edit the .env file with your API keys")
print("2. Run: python3 main.py")
print("3. Open http://127.0.0.1:8080 in your browser")
else:
print("\n❌ Installation test failed. Please check the errors above.")