-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
42 lines (31 loc) · 949 Bytes
/
main.py
File metadata and controls
42 lines (31 loc) · 949 Bytes
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
"""
DDA Toolkit - Main Entry Point
Database Development Assistant
"""
import sys
import logging
from pathlib import Path
# Add src to path
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root / 'src'))
from src.ui.cli_interface import CLIInterface
from src.utils.logger import setup_logger
def main():
"""Main entry point for DDA toolkit."""
# Setup logging
config_file = project_root / 'config' / 'tool_config.yaml'
logger = setup_logger('dda', str(config_file) if config_file.exists() else None)
logger.info("Starting DDA Toolkit")
try:
# Run CLI interface
cli = CLIInterface()
cli.run()
except KeyboardInterrupt:
logger.info("Application terminated by user")
sys.exit(0)
except Exception as e:
logger.error(f"Unexpected error: {e}", exc_info=True)
print(f"Error: {e}")
sys.exit(1)
if __name__ == '__main__':
main()