From 03722ad893a4af75aa18130b12f6e7c8e78100b2 Mon Sep 17 00:00:00 2001 From: Paul Nechifor Date: Thu, 15 Jan 2026 07:18:24 +0200 Subject: [PATCH 1/2] verify blueprints --- .../demo_object_scene_registration.py | 1 - dimos/perception/spatial_perception.py | 2 +- dimos/robot/all_blueprints.py | 8 ++--- dimos/robot/test_all_blueprints.py | 35 +++++++++++++++++++ .../web/websocket_vis/websocket_vis_module.py | 3 +- 5 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 dimos/robot/test_all_blueprints.py diff --git a/dimos/perception/demo_object_scene_registration.py b/dimos/perception/demo_object_scene_registration.py index fe9c3100bb..d1d879d0ab 100644 --- a/dimos/perception/demo_object_scene_registration.py +++ b/dimos/perception/demo_object_scene_registration.py @@ -15,7 +15,6 @@ from dimos.agents.agent import llm_agent from dimos.agents.cli.human import human_input -from dimos.agents.spec import Provider from dimos.core.blueprints import autoconnect from dimos.hardware.sensors.camera.realsense import realsense_camera from dimos.hardware.sensors.camera.zed import zed_camera diff --git a/dimos/perception/spatial_perception.py b/dimos/perception/spatial_perception.py index 5463f08757..e33820f22c 100644 --- a/dimos/perception/spatial_perception.py +++ b/dimos/perception/spatial_perception.py @@ -32,7 +32,7 @@ from dimos.agents_deprecated.memory.spatial_vector_db import SpatialVectorDB from dimos.agents_deprecated.memory.visual_memory import VisualMemory from dimos.constants import DIMOS_PROJECT_ROOT -from dimos.core import DimosCluster, In, Module, rpc +from dimos.core import DimosCluster, In, rpc from dimos.core.skill_module import SkillModule from dimos.msgs.sensor_msgs import Image from dimos.types.robot_location import RobotLocation diff --git a/dimos/robot/all_blueprints.py b/dimos/robot/all_blueprints.py index 6dfa077498..2d41ef44fa 100644 --- a/dimos/robot/all_blueprints.py +++ b/dimos/robot/all_blueprints.py @@ -49,12 +49,10 @@ # Demo blueprints "demo-camera": "dimos.hardware.sensors.camera.module:demo_camera", "demo-osm": "dimos.mapping.osm.demo_osm:demo_osm", - "demo-skill": "dimos.agents2.skills.demo_skill:demo_skill", - "demo-gps-nav": "dimos.agents2.skills.demo_gps_nav:demo_gps_nav_skill", - "demo-google-maps-skill": "dimos.agents2.skills.demo_google_maps_skill:demo_google_maps_skill", + "demo-skill": "dimos.agents.skills.demo_skill:demo_skill", + "demo-gps-nav": "dimos.agents.skills.demo_gps_nav:demo_gps_nav_skill", + "demo-google-maps-skill": "dimos.agents.skills.demo_google_maps_skill:demo_google_maps_skill", "demo-object-scene-registration": "dimos.perception.demo_object_scene_registration:demo_object_scene_registration", - "demo-remapping": "dimos.robot.unitree_webrtc.demo_remapping:remapping", - "demo-remapping-transport": "dimos.robot.unitree_webrtc.demo_remapping:remapping_and_transport", "demo-error-on-name-conflicts": "dimos.robot.unitree_webrtc.demo_error_on_name_conflicts:blueprint", } diff --git a/dimos/robot/test_all_blueprints.py b/dimos/robot/test_all_blueprints.py new file mode 100644 index 0000000000..5e91caad11 --- /dev/null +++ b/dimos/robot/test_all_blueprints.py @@ -0,0 +1,35 @@ +# Copyright 2025-2026 Dimensional Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest + +from dimos.core.blueprints import ModuleBlueprintSet +from dimos.robot.all_blueprints import all_blueprints, get_blueprint_by_name + +# Optional dependencies that are allowed to be missing +OPTIONAL_DEPENDENCIES = {"pyrealsense2"} + + +@pytest.mark.parametrize("blueprint_name", all_blueprints.keys()) +def test_all_blueprints_are_valid(blueprint_name: str) -> None: + """Test that all blueprints in all_blueprints are valid ModuleBlueprintSet instances.""" + try: + blueprint = get_blueprint_by_name(blueprint_name) + except ModuleNotFoundError as e: + if e.name in OPTIONAL_DEPENDENCIES: + pytest.skip(f"Skipping due to missing optional dependency: {e.name}") + raise + assert isinstance(blueprint, ModuleBlueprintSet), ( + f"Blueprint '{blueprint_name}' is not a ModuleBlueprintSet, got {type(blueprint)}" + ) diff --git a/dimos/web/websocket_vis/websocket_vis_module.py b/dimos/web/websocket_vis/websocket_vis_module.py index 776c82c68b..d73844b4ec 100644 --- a/dimos/web/websocket_vis/websocket_vis_module.py +++ b/dimos/web/websocket_vis/websocket_vis_module.py @@ -32,8 +32,7 @@ import socketio # type: ignore[import-untyped] from starlette.applications import Starlette from starlette.responses import FileResponse, RedirectResponse, Response -from starlette.routing import Mount, Route -from starlette.staticfiles import StaticFiles +from starlette.routing import Route import uvicorn from dimos.utils.data import get_data From e74dfb63feefb48081518ac44f524f6508e3a931 Mon Sep 17 00:00:00 2001 From: stash Date: Wed, 14 Jan 2026 22:25:58 -0800 Subject: [PATCH 2/2] Fix geometry msgs check failure in CI --- dimos/robot/test_all_blueprints.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dimos/robot/test_all_blueprints.py b/dimos/robot/test_all_blueprints.py index 5e91caad11..684cdd938a 100644 --- a/dimos/robot/test_all_blueprints.py +++ b/dimos/robot/test_all_blueprints.py @@ -18,7 +18,10 @@ from dimos.robot.all_blueprints import all_blueprints, get_blueprint_by_name # Optional dependencies that are allowed to be missing -OPTIONAL_DEPENDENCIES = {"pyrealsense2"} +OPTIONAL_DEPENDENCIES = {"pyrealsense2", "geometry_msgs", "turbojpeg"} +OPTIONAL_ERROR_SUBSTRINGS = { + "Unable to locate turbojpeg library automatically", +} @pytest.mark.parametrize("blueprint_name", all_blueprints.keys()) @@ -30,6 +33,11 @@ def test_all_blueprints_are_valid(blueprint_name: str) -> None: if e.name in OPTIONAL_DEPENDENCIES: pytest.skip(f"Skipping due to missing optional dependency: {e.name}") raise + except Exception as e: + message = str(e) + if any(substring in message for substring in OPTIONAL_ERROR_SUBSTRINGS): + pytest.skip(f"Skipping due to missing optional dependency: {message}") + raise assert isinstance(blueprint, ModuleBlueprintSet), ( f"Blueprint '{blueprint_name}' is not a ModuleBlueprintSet, got {type(blueprint)}" )