From e4e8911001a1c6f8cfab867dde74254bec84b729 Mon Sep 17 00:00:00 2001 From: ykcheungab Date: Fri, 4 Sep 2026 17:29:11 +0800 Subject: [PATCH] fix not depend on orisys-common --- internal/run_operator.py | 8 +------- run.py | 8 +------- src/sensor_bench/paths.py | 7 ------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/internal/run_operator.py b/internal/run_operator.py index f94a668..384dff6 100644 --- a/internal/run_operator.py +++ b/internal/run_operator.py @@ -22,19 +22,13 @@ for path in (OPERATOR_SRC, PUBLIC_SRC): if str(path) not in sys.path: sys.path.insert(0, str(path)) -# Prefer sibling checkouts for editable Sensor-owned preview. -ORISYS_COMMON_SRC = REPO.parent / "orisys-common" / "src" -if ORISYS_COMMON_SRC.is_dir() and str(ORISYS_COMMON_SRC) not in sys.path: - sys.path.insert(0, str(ORISYS_COMMON_SRC)) - +# Prefer sibling orisys-sdk checkout for Sensor-owned preview. ORISYS_SRC = REPO.parent / "orisys-sdk" / "src" if ORISYS_SRC.is_dir() and str(ORISYS_SRC) not in sys.path: sys.path.insert(0, str(ORISYS_SRC)) -from orisys_common.runtime import configure_app_root # noqa: E402 from sensor_bench.paths import prefer_local_sensor_bundles # noqa: E402 -configure_app_root(REPO) prefer_local_sensor_bundles(REPO) from sensor_bench_operator.__main__ import main # noqa: E402 diff --git a/run.py b/run.py index f18dbdd..0af1ecb 100644 --- a/run.py +++ b/run.py @@ -22,19 +22,13 @@ SRC = ROOT / "src" if str(SRC) not in sys.path: sys.path.insert(0, str(SRC)) -# Prefer sibling checkouts for editable Sensor-owned preview. -ORISYS_COMMON_SRC = ROOT.parent / "orisys-common" / "src" -if ORISYS_COMMON_SRC.is_dir() and str(ORISYS_COMMON_SRC) not in sys.path: - sys.path.insert(0, str(ORISYS_COMMON_SRC)) - +# Prefer sibling orisys-sdk checkout for Sensor-owned preview. ORISYS_SRC = ROOT.parent / "orisys-sdk" / "src" if ORISYS_SRC.is_dir() and str(ORISYS_SRC) not in sys.path: sys.path.insert(0, str(ORISYS_SRC)) -from orisys_common.runtime import configure_app_root # noqa: E402 from sensor_bench.paths import prefer_local_sensor_bundles # noqa: E402 -configure_app_root(ROOT) prefer_local_sensor_bundles(ROOT) from sensor_bench.main import main # noqa: E402 diff --git a/src/sensor_bench/paths.py b/src/sensor_bench/paths.py index 6015db6..237d3d7 100644 --- a/src/sensor_bench/paths.py +++ b/src/sensor_bench/paths.py @@ -142,13 +142,6 @@ def prefer_local_sensor_bundles(root: Path | None = None) -> Path | None: global _PREFERRED_SENSOR_ROOT resolved_root = Path(root).resolve() if root is not None else app_root() - try: - from orisys_common.runtime import configure_app_root - - configure_app_root(resolved_root) - except Exception: # noqa: BLE001 - pass - sensors = (resolved_root / "sensors").resolve() if not sensors.is_dir(): return None