Coverage for openhcs/pyqt_gui/__main__.py: 0.0%
16 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-04 02:09 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-04 02:09 +0000
1#!/usr/bin/env python3
2"""
3OpenHCS PyQt6 GUI - Module Entry Point
5Allows running the PyQt6 GUI directly with:
6 python -m openhcs.pyqt_gui
8This is a convenience wrapper around the launch script.
9"""
11import sys
14def main():
15 """Main entry point with graceful error handling for missing GUI dependencies."""
16 try:
17 # Import the main function from launch script
18 from openhcs.pyqt_gui.launch import main as launch_main
19 return launch_main()
20 except ImportError as e:
21 if 'PyQt6' in str(e) or 'pyqt_gui' in str(e):
22 print("ERROR: PyQt6 GUI dependencies not installed.", file=sys.stderr)
23 print("", file=sys.stderr)
24 print("To install GUI dependencies, run:", file=sys.stderr)
25 print(" pip install openhcs[gui]", file=sys.stderr)
26 print("", file=sys.stderr)
27 print("Or for full installation with viewers:", file=sys.stderr)
28 print(" pip install openhcs[gui,viz]", file=sys.stderr)
29 return 1
30 else:
31 raise
34if __name__ == "__main__":
35 sys.exit(main())