fix: guard PyQt6 imports in v7 package for headless CI environments
v7/__init__.py: wrap workers/map_widget/dashboard imports in try/except so CI runners without PyQt6 can still test models, processing, hardware. test_v7.py: skip TestPolarToGeographic when PyQt6 unavailable, split TestV7Init.test_key_exports into core vs PyQt6-dependent assertions.
This commit is contained in:
@@ -42,25 +42,27 @@ from .processing import (
|
||||
apply_pitch_correction,
|
||||
)
|
||||
|
||||
# Workers and simulator
|
||||
from .workers import (
|
||||
RadarDataWorker,
|
||||
GPSDataWorker,
|
||||
TargetSimulator,
|
||||
polar_to_geographic,
|
||||
)
|
||||
# Workers, map widget, and dashboard require PyQt6 — import lazily so that
|
||||
# tests/CI environments without PyQt6 can still access models/hardware/processing.
|
||||
try:
|
||||
from .workers import (
|
||||
RadarDataWorker,
|
||||
GPSDataWorker,
|
||||
TargetSimulator,
|
||||
polar_to_geographic,
|
||||
)
|
||||
|
||||
# Map widget
|
||||
from .map_widget import (
|
||||
MapBridge,
|
||||
RadarMapWidget,
|
||||
)
|
||||
from .map_widget import (
|
||||
MapBridge,
|
||||
RadarMapWidget,
|
||||
)
|
||||
|
||||
# Main dashboard
|
||||
from .dashboard import (
|
||||
RadarDashboard,
|
||||
RangeDopplerCanvas,
|
||||
)
|
||||
from .dashboard import (
|
||||
RadarDashboard,
|
||||
RangeDopplerCanvas,
|
||||
)
|
||||
except ImportError: # PyQt6 not installed (e.g. CI headless runner)
|
||||
pass
|
||||
|
||||
__all__ = [ # noqa: RUF022
|
||||
# models
|
||||
|
||||
Reference in New Issue
Block a user