Skip to content

Commit 5ed6f28

Browse files
committed
Merge remote-tracking branch 'origin/dev' into ivan/feat/clock-sync-configurator
# Conflicts: # dimos/robot/cli/dimos.py
2 parents f1fa5e6 + 6b73b42 commit 5ed6f28

54 files changed

Lines changed: 392 additions & 628 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker.yml

Lines changed: 2 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -212,70 +212,9 @@ jobs:
212212
uses: ./.github/workflows/tests.yml
213213
secrets: inherit
214214
with:
215-
cmd: "pytest && pytest -m ros" # run tests that depend on ros as well
215+
cmd: "pytest --durations=0 -m 'not (tool or mujoco)'"
216216
dev-image: ros-dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true' || needs.check-changes.outputs.ros == 'true') && needs.ros-dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
217217

218-
run-tests:
219-
needs: [check-changes, dev]
220-
if: ${{
221-
always() &&
222-
needs.check-changes.result == 'success' &&
223-
(needs.check-changes.outputs.tests == 'true' ||
224-
needs.check-changes.outputs.python == 'true' ||
225-
needs.check-changes.outputs.dev == 'true')
226-
}}
227-
uses: ./.github/workflows/tests.yml
228-
secrets: inherit
229-
with:
230-
cmd: "pytest"
231-
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
232-
233-
# we run in parallel with normal tests for speed
234-
run-heavy-tests:
235-
needs: [check-changes, dev]
236-
if: ${{
237-
always() &&
238-
needs.check-changes.result == 'success' &&
239-
(needs.check-changes.outputs.tests == 'true' ||
240-
needs.check-changes.outputs.python == 'true' ||
241-
needs.check-changes.outputs.dev == 'true')
242-
}}
243-
uses: ./.github/workflows/tests.yml
244-
secrets: inherit
245-
with:
246-
cmd: "pytest -m heavy"
247-
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
248-
249-
run-lcm-tests:
250-
needs: [check-changes, dev]
251-
if: ${{
252-
always() &&
253-
needs.check-changes.result == 'success' &&
254-
(needs.check-changes.outputs.tests == 'true' ||
255-
needs.check-changes.outputs.python == 'true' ||
256-
needs.check-changes.outputs.dev == 'true')
257-
}}
258-
uses: ./.github/workflows/tests.yml
259-
secrets: inherit
260-
with:
261-
cmd: "pytest -m lcm"
262-
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
263-
264-
run-integration-tests:
265-
needs: [check-changes, dev]
266-
if: ${{
267-
always() &&
268-
needs.check-changes.result == 'success' &&
269-
(needs.check-changes.outputs.tests == 'true' ||
270-
needs.check-changes.outputs.python == 'true' ||
271-
needs.check-changes.outputs.dev == 'true')
272-
}}
273-
uses: ./.github/workflows/tests.yml
274-
secrets: inherit
275-
with:
276-
cmd: "pytest -m integration"
277-
dev-image: dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true') && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
278-
279218
run-mypy:
280219
needs: [check-changes, ros-dev]
281220
if: ${{
@@ -292,43 +231,8 @@ jobs:
292231
cmd: "MYPYPATH=/opt/ros/humble/lib/python3.10/site-packages mypy dimos"
293232
dev-image: ros-dev:${{ (needs.check-changes.outputs.python == 'true' || needs.check-changes.outputs.dev == 'true' || needs.check-changes.outputs.ros == 'true') && needs.ros-dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
294233

295-
# Run module tests directly to avoid pytest forking issues
296-
# run-module-tests:
297-
# needs: [check-changes, dev]
298-
# if: ${{
299-
# always() &&
300-
# needs.check-changes.result == 'success' &&
301-
# ((needs.dev.result == 'success') ||
302-
# (needs.dev.result == 'skipped' &&
303-
# needs.check-changes.outputs.tests == 'true'))
304-
# }}
305-
# runs-on: [self-hosted, x64, 16gb]
306-
# container:
307-
# image: ghcr.io/dimensionalos/dev:${{ needs.check-changes.outputs.dev == 'true' && needs.dev.result == 'success' && needs.check-changes.outputs.branch-tag || 'dev' }}
308-
# steps:
309-
# - name: Fix permissions
310-
# run: |
311-
# sudo chown -R $USER:$USER ${{ github.workspace }} || true
312-
#
313-
# - uses: actions/checkout@v4
314-
# with:
315-
# lfs: true
316-
#
317-
# - name: Configure Git LFS
318-
# run: |
319-
# git config --global --add safe.directory '*'
320-
# git lfs install
321-
# git lfs fetch
322-
# git lfs checkout
323-
#
324-
# - name: Run module tests
325-
# env:
326-
# CI: "true"
327-
# run: |
328-
# /entrypoint.sh bash -c "pytest -m module"
329-
330234
ci-complete:
331-
needs: [check-changes, ros, python, ros-python, dev, ros-dev, run-tests, run-heavy-tests, run-lcm-tests, run-integration-tests, run-ros-tests, run-mypy]
235+
needs: [check-changes, ros, python, ros-python, dev, ros-dev, run-ros-tests, run-mypy]
332236
runs-on: [self-hosted, Linux]
333237
if: always()
334238
steps:

bin/pytest-slow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set -euo pipefail
44

55
. .venv/bin/activate
6-
exec pytest "$@" -m 'not (tool or module or neverending or mujoco)' dimos
6+
exec pytest "$@" -m 'not (tool or mujoco)' dimos

dimos/agents/mcp/test_mcp_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def add(self, x: int, y: int) -> str:
2929
return str(x + y)
3030

3131

32-
@pytest.mark.integration
32+
@pytest.mark.slow
3333
@pytest.mark.parametrize("dask", [False, True])
3434
def test_can_call_tool(dask, agent_setup):
3535
history = agent_setup(
@@ -66,7 +66,7 @@ def register_user(self, name: str) -> str:
6666
return "User name registered successfully."
6767

6868

69-
@pytest.mark.integration
69+
@pytest.mark.slow
7070
@pytest.mark.parametrize("dask", [False, True])
7171
def test_can_call_again_on_error(dask, agent_setup):
7272
history = agent_setup(
@@ -118,7 +118,7 @@ def go_to_location(self, description: str) -> str:
118118
return f"Going to the {description}."
119119

120120

121-
@pytest.mark.integration
121+
@pytest.mark.slow
122122
def test_multiple_tool_calls_with_multiple_messages(agent_setup):
123123
history = agent_setup(
124124
blueprints=[MultipleTools.blueprint(), NavigationSkill.blueprint()],
@@ -172,7 +172,7 @@ def test_multiple_tool_calls_with_multiple_messages(agent_setup):
172172
assert len(go_to_location_calls) == 2
173173

174174

175-
@pytest.mark.integration
175+
@pytest.mark.slow
176176
def test_prompt(agent_setup):
177177
history = agent_setup(
178178
blueprints=[],
@@ -190,7 +190,7 @@ def take_a_picture(self) -> Image:
190190
return Image.from_file(get_data("cafe-smol.jpg")).to_rgb()
191191

192192

193-
@pytest.mark.integration
193+
@pytest.mark.slow
194194
def test_image(agent_setup):
195195
history = agent_setup(
196196
blueprints=[Visualizer.blueprint()],

dimos/agents/skills/test_google_maps_skill_container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self):
7070
self._max_valid_distance = 20000
7171

7272

73-
@pytest.mark.integration
73+
@pytest.mark.slow
7474
def test_where_am_i(agent_setup) -> None:
7575
history = agent_setup(
7676
blueprints=[FakeGPS.blueprint(), MockedWhereAmISkill.blueprint()],
@@ -80,7 +80,7 @@ def test_where_am_i(agent_setup) -> None:
8080
assert "bourbon" in history[-1].content.lower()
8181

8282

83-
@pytest.mark.integration
83+
@pytest.mark.slow
8484
def test_get_gps_position_for_queries(agent_setup) -> None:
8585
history = agent_setup(
8686
blueprints=[FakeGPS.blueprint(), MockedPositionSkill.blueprint()],

dimos/agents/skills/test_gps_nav_skills.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self):
3535
self._max_valid_distance = 50000
3636

3737

38-
@pytest.mark.integration
38+
@pytest.mark.slow
3939
def test_set_gps_travel_points(agent_setup) -> None:
4040
history = agent_setup(
4141
blueprints=[FakeGPS.blueprint(), MockedGpsNavSkill.blueprint()],
@@ -50,7 +50,7 @@ def test_set_gps_travel_points(agent_setup) -> None:
5050
assert "success" in history[-1].content.lower()
5151

5252

53-
@pytest.mark.integration
53+
@pytest.mark.slow
5454
def test_set_gps_travel_points_multiple(agent_setup) -> None:
5555
history = agent_setup(
5656
blueprints=[FakeGPS.blueprint(), MockedGpsNavSkill.blueprint()],

dimos/agents/skills/test_navigation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def _navigate_using_semantic_map(self, query):
7272
return f"Successfuly arrived at '{query}'"
7373

7474

75-
@pytest.mark.integration
75+
@pytest.mark.slow
7676
def test_stop_movement(agent_setup) -> None:
7777
history = agent_setup(
7878
blueprints=[
@@ -86,7 +86,7 @@ def test_stop_movement(agent_setup) -> None:
8686
assert "stopped" in history[-1].content.lower()
8787

8888

89-
@pytest.mark.integration
89+
@pytest.mark.slow
9090
def test_start_exploration(agent_setup) -> None:
9191
history = agent_setup(
9292
blueprints=[
@@ -102,7 +102,7 @@ def test_start_exploration(agent_setup) -> None:
102102
assert "explor" in history[-1].content.lower()
103103

104104

105-
@pytest.mark.integration
105+
@pytest.mark.slow
106106
def test_go_to_semantic_location(agent_setup) -> None:
107107
history = agent_setup(
108108
blueprints=[

dimos/agents/skills/test_unitree_skill_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self):
2929
self._bound_rpc_calls["GO2Connection.publish_request"] = lambda *args, **kwargs: None
3030

3131

32-
@pytest.mark.integration
32+
@pytest.mark.slow
3333
def test_pounce(agent_setup) -> None:
3434
history = agent_setup(
3535
blueprints=[MockedUnitreeSkill.blueprint()],

dimos/agents/test_agent.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def add(self, x: int, y: int) -> str:
2929
return str(x + y)
3030

3131

32-
@pytest.mark.integration
32+
@pytest.mark.slow
3333
@pytest.mark.parametrize("dask", [False, True])
3434
def test_can_call_tool(dask, agent_setup):
3535
history = agent_setup(
@@ -68,7 +68,7 @@ def register_user(self, name: str) -> str:
6868
return "User name registered successfully."
6969

7070

71-
@pytest.mark.integration
71+
@pytest.mark.slow
7272
@pytest.mark.parametrize("dask", [False, True])
7373
def test_can_call_again_on_error(dask, agent_setup):
7474
history = agent_setup(
@@ -120,7 +120,7 @@ def go_to_location(self, description: str) -> str:
120120
return f"Going to the {description}."
121121

122122

123-
@pytest.mark.integration
123+
@pytest.mark.slow
124124
def test_multiple_tool_calls_with_multiple_messages(agent_setup):
125125
history = agent_setup(
126126
blueprints=[MultipleTools.blueprint(), NavigationSkill.blueprint()],
@@ -174,7 +174,7 @@ def test_multiple_tool_calls_with_multiple_messages(agent_setup):
174174
assert len(go_to_location_calls) == 2
175175

176176

177-
@pytest.mark.integration
177+
@pytest.mark.slow
178178
def test_prompt(agent_setup):
179179
history = agent_setup(
180180
blueprints=[],
@@ -192,7 +192,7 @@ def take_a_picture(self) -> Image:
192192
return Image.from_file(get_data("cafe-smol.jpg")).to_rgb()
193193

194194

195-
@pytest.mark.integration
195+
@pytest.mark.slow
196196
def test_image(agent_setup):
197197
history = agent_setup(
198198
blueprints=[Visualizer.blueprint()],

dimos/agents_deprecated/memory/test_image_embedding.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
import numpy as np
2323
import pytest
2424
from reactivex import operators as ops
25+
from reactivex.scheduler import ThreadPoolScheduler
2526

2627
from dimos.agents_deprecated.memory.image_embedding import ImageEmbeddingProvider
2728
from dimos.stream.video_provider import VideoProvider
2829

2930

30-
@pytest.mark.heavy
31+
@pytest.mark.slow
3132
class TestImageEmbedding:
3233
"""Test class for CLIP image embedding functionality."""
3334

@@ -45,6 +46,7 @@ def test_clip_embedding_initialization(self) -> None:
4546

4647
def test_clip_embedding_process_video(self) -> None:
4748
"""Test CLIP embedding provider can process video frames and return embeddings."""
49+
test_scheduler = ThreadPoolScheduler(max_workers=4)
4850
try:
4951
from dimos.utils.data import get_data
5052

@@ -53,7 +55,9 @@ def test_clip_embedding_process_video(self) -> None:
5355
embedding_provider = ImageEmbeddingProvider(model_name="clip", dimensions=512)
5456

5557
assert os.path.exists(video_path), f"Test video not found: {video_path}"
56-
video_provider = VideoProvider(dev_name="test_video", video_source=video_path)
58+
video_provider = VideoProvider(
59+
dev_name="test_video", video_source=video_path, pool_scheduler=test_scheduler
60+
)
5761

5862
video_stream = video_provider.capture_video_as_observable(realtime=False, fps=15)
5963

@@ -146,6 +150,8 @@ def on_completed() -> None:
146150

147151
except Exception as e:
148152
pytest.fail(f"Test failed with error: {e}")
153+
finally:
154+
test_scheduler.executor.shutdown(wait=True)
149155

150156
def test_clip_embedding_similarity(self) -> None:
151157
"""Test CLIP embedding similarity search and text-to-image queries."""
@@ -205,7 +211,3 @@ def test_clip_embedding_similarity(self) -> None:
205211

206212
except Exception as e:
207213
pytest.fail(f"Similarity test failed with error: {e}")
208-
209-
210-
if __name__ == "__main__":
211-
pytest.main(["-v", "--disable-warnings", __file__])

0 commit comments

Comments
 (0)