1+ #!/usr/bin/env python3
2+ """Debug CI Environment
3+ Quick debugging script to check CI environment configuration.
4+ This script is referenced by .github/workflows/tests.yml
5+ """
6+ import os
7+ import sys
8+ import platform
9+ from pathlib import Path
10+
11+ def main ():
12+ """Print CI environment debug information."""
13+ print ("=== CI Environment Debug Information ===" )
14+ print (f"Platform: { platform .platform ()} " )
15+ print (f"Python version: { sys .version } " )
16+ print (f"Working directory: { os .getcwd ()} " )
17+ print (f"Python path: { sys .path } " )
18+
19+ # Check for required environment variables
20+ required_vars = ['OPENAI_API_KEY' , 'ANTHROPIC_API_KEY' , 'GOOGLE_AI_API_KEY' , 'HF_TOKEN' ]
21+ print ("\n === API Keys Status ===" )
22+ for var in required_vars :
23+ value = os .environ .get (var )
24+ if value :
25+ print (f"✅ { var } : { '*' * 20 } (set)" )
26+ else :
27+ print (f"❌ { var } : Not set" )
28+
29+ # Check for key files
30+ print ("\n === Key Files Check ===" )
31+ key_files = [
32+ 'requirements.txt' ,
33+ 'pyproject.toml' ,
34+ 'src/orchestrator/__init__.py' ,
35+ 'tests/' ,
36+ 'config/' ,
37+ 'scripts/' ,
38+ ]
39+
40+ for file_path in key_files :
41+ path = Path (file_path )
42+ if path .exists ():
43+ print (f"✅ { file_path } : exists" )
44+ else :
45+ print (f"❌ { file_path } : missing" )
46+
47+ # Check Python package installation
48+ print ("\n === Package Installation Check ===" )
49+ try :
50+ import orchestrator
51+ print ("✅ orchestrator package: importable" )
52+ print (f" Version: { getattr (orchestrator , '__version__' , 'unknown' )} " )
53+ print (f" Location: { orchestrator .__file__ } " )
54+ except ImportError as e :
55+ print (f"❌ orchestrator package: { e } " )
56+
57+ # Test basic functionality
58+ print ("\n === Basic Functionality Test ===" )
59+ try :
60+ # Try importing core components
61+ from orchestrator .api import compile
62+ from orchestrator .core .pipeline import Pipeline
63+ print ("✅ Core components: importable" )
64+ except ImportError as e :
65+ print (f"❌ Core components: { e } " )
66+
67+ print ("\n === CI Environment Debug Complete ===" )
68+ return 0
69+
70+ if __name__ == '__main__' :
71+ sys .exit (main ())
0 commit comments