Skip to content

chore: delete some dead code#2414

Open
paul-nechifor wants to merge 1 commit into
mainfrom
paul/chore/delete-dead-code
Open

chore: delete some dead code#2414
paul-nechifor wants to merge 1 commit into
mainfrom
paul/chore/delete-dead-code

Conversation

@paul-nechifor
Copy link
Copy Markdown
Contributor

Problem

We still have lots of dead code.

Solution

This deletes some of it.

@paul-nechifor paul-nechifor force-pushed the paul/chore/delete-dead-code branch from 4202e7b to dc8a8cf Compare June 6, 2026 22:37
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 6, 2026

Greptile Summary

This PR removes 27 Python files that appear to be unused throughout the codebase — covering web servers, stream processing utilities, navigation helpers, manipulation specs, testing helpers, and exception classes.

  • All 27 deleted files were verified to have no live imports in the remaining codebase, and none appear in any __init__.py re-exports.
  • The deleted dimos/web/fastapi_server.py and dimos/web/flask_server.py are separate from the actively-used dimos/web/dimos_interface/api/server.py; robot_web_interface.py continues to import FastAPIServer from the latter.

Confidence Score: 5/5

Safe to merge — all 27 deleted files are confirmed unreferenced across the entire codebase.

Every deleted module was checked for imports, init.py re-exports, and symbol references. Nothing in the remaining codebase depends on any of the removed files. The legacy FastAPIServer and FlaskServer in the deleted dimos/web/ files are distinct from the active FastAPIServer in dimos/web/dimos_interface/api/server.py, which continues to be used correctly.

No files require special attention — all deletions are clean.

Important Files Changed

Filename Overview
dimos/web/fastapi_server.py Deleted legacy FastAPIServer — superseded by dimos/web/dimos_interface/api/server.py; no remaining imports.
dimos/web/flask_server.py Deleted legacy FlaskServer — no remaining imports across the codebase.
dimos/stream/video_operators.py Deleted VideoOperators and Operators utility classes (605 lines) — no remaining imports.
dimos/stream/rtsp_video_provider.py Deleted RtspVideoProvider ffmpeg-backed stream class — no remaining imports.
dimos/stream/frame_processor.py Deleted FrameProcessor (optical flow, JPEG export) — no remaining imports.
dimos/stream/data_provider.py Deleted AbstractDataProvider, ROSDataProvider, and QueryDataProvider — no remaining imports.
dimos/exceptions/agent_memory_exceptions.py Deleted AgentMemory exception hierarchy — no remaining imports.
dimos/robot/catalog/panda.py Deleted Franka Panda robot configuration helper — no remaining imports despite all export.
dimos/utils/metrics.py Deleted timed and log_timing_to_rerun decorators — no remaining imports.
dimos/robot/unitree/testing/helpers.py Deleted Open3D visualization testing helpers — no remaining imports.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph DELETED["Deleted (dead code)"]
        direction TB
        A[dimos/web/fastapi_server.py\nFastAPIServer legacy]
        B[dimos/web/flask_server.py\nFlaskServer legacy]
        C[dimos/stream/video_operators.py\nVideoOperators / Operators]
        D[dimos/stream/frame_processor.py\nFrameProcessor]
        E[dimos/stream/rtsp_video_provider.py\nRtspVideoProvider]
        F[dimos/stream/data_provider.py\nAbstractDataProvider etc.]
        G[dimos/exceptions/agent_memory_exceptions.py]
        H[dimos/utils/metrics.py\ntimed / log_timing_to_rerun]
        I[dimos/robot/catalog/panda.py]
    end
    subgraph ACTIVE["Still Active"]
        Q[dimos/web/dimos_interface/api/server.py\nFastAPIServer - current]
        R[dimos/web/robot_web_interface.py]
    end
    R -->|imports FastAPIServer| Q
Loading

Reviews (1): Last reviewed commit: "chore: delete dead code" | Re-trigger Greptile

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2107 1 2106 81
View the top 1 failed test(s) by shortest run time
dimos.e2e_tests.test_dimsim_path_replaning::test_path_replanning
Stack Traces | 244s run time
lcm_spy = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7d0b09a162d0>
start_blueprint = <function start_blueprint.<locals>.set_name_and_start at 0x7d0b08834fe0>
dim_sim = <dimos.e2e_tests.dim_sim_client.DimSimClient object at 0x7d0b09e2bb30>
direct_cmd_vel_explorer = <dimos.simulation.mujoco.direct_cmd_vel_explorer.DirectCmdVelExplorer object at 0x7d0b09c349e0>
spawn_wall_on_pose = <function spawn_wall_on_pose.<locals>.spawn at 0x7d0b08835e40>

    @pytest.mark.self_hosted_large
    def test_path_replanning(
        lcm_spy, start_blueprint, dim_sim, direct_cmd_vel_explorer, spawn_wall_on_pose
    ) -> None:
        start_blueprint(
            "--dimsim-scene=empty",
            "run",
            "unitree-go2-agentic",
            simulator="dimsim",
        )
        lcm_spy.save_topic(".../McpClient/on_system_modules/res")
        lcm_spy.wait_for_saved_topic(".../McpClient/on_system_modules/res", timeout=1200.0)
    
        # robot spawns at (3, 2)
    
        # side wall
        dim_sim.add_wall(2, -2.5, 12, -2.5)
        # other side wall
        dim_sim.add_wall(2, 3.5, 12, 3.5)
        # back wall (behind robot)
        dim_sim.add_wall(2, -2.5, 2, 3.5)
        # forward wall (far end)
        dim_sim.add_wall(12, -2.5, 12, 3.5)
        # dividing wall at x=7 with doors at y=[-1.5,-0.5] and y=[1.5,2.5]
        dim_sim.add_wall(7, -2.5, 7, -1.5)
        dim_sim.add_wall(7, -0.5, 7, 1.5)
        dim_sim.add_wall(7, 2.5, 7, 3.5)
    
        direct_cmd_vel_explorer.linear_speed = 0.8
        direct_cmd_vel_explorer.follow_points([(10, 2), (2.5, 2), (3, 2)])
    
        # When the robot comes within 1.5 m of the left door's centre, drop a wall
        # in the opening so the planner has to bail out and route through the
        # right door at y=-1 instead.
        spawn_wall_on_pose(
            point=(7, 2),
            threshold=1.5,
            wall=(7, 1.5, 7, 2.5),
        )
    
        dim_sim.publish_goal(10.913, 0.588)
    
>       lcm_spy.wait_until_odom_position(10.913, 0.588, threshold=1, timeout=120)

dim_sim    = <dimos.e2e_tests.dim_sim_client.DimSimClient object at 0x7d0b09e2bb30>
direct_cmd_vel_explorer = <dimos.simulation.mujoco.direct_cmd_vel_explorer.DirectCmdVelExplorer object at 0x7d0b09c349e0>
lcm_spy    = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7d0b09a162d0>
spawn_wall_on_pose = <function spawn_wall_on_pose.<locals>.spawn at 0x7d0b08835e40>
start_blueprint = <function start_blueprint.<locals>.set_name_and_start at 0x7d0b08834fe0>

dimos/e2e_tests/test_dimsim_path_replaning.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dimos/e2e_tests/lcm_spy.py:182: in wait_until_odom_position
    self.wait_for_message_result(
        predicate  = <function LcmSpy.wait_until_odom_position.<locals>.predicate at 0x7d0b08836840>
        self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7d0b09a162d0>
        threshold  = 1
        timeout    = 120
        x          = 10.913
        y          = 0.588
dimos/e2e_tests/lcm_spy.py:168: in wait_for_message_result
    self.wait_until(
        event      = <threading.Event at 0x7d0b093d1dc0: unset>
        fail_message = 'Failed to get to position x=10.913, y=0.588'
        listener   = <function LcmSpy.wait_for_message_result.<locals>.listener at 0x7d0b088368e0>
        predicate  = <function LcmSpy.wait_until_odom_position.<locals>.predicate at 0x7d0b08836840>
        self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7d0b09a162d0>
        timeout    = 120
        topic      = '/odom#geometry_msgs.PoseStamped'
        type       = <class 'dimos.msgs.geometry_msgs.PoseStamped.PoseStamped'>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7d0b09a162d0>

    def wait_until(
        self,
        *,
        condition: Callable[[], bool],
        timeout: float,
        error_message: str,
        poll_interval: float = 0.1,
    ) -> None:
        start_time = time.time()
        while time.time() - start_time < timeout:
            if condition():
                return
            time.sleep(poll_interval)
>       raise TimeoutError(error_message)
E       TimeoutError: Failed to get to position x=10.913, y=0.588

condition  = <bound method Event.is_set of <threading.Event at 0x7d0b093d1dc0: unset>>
error_message = 'Failed to get to position x=10.913, y=0.588'
poll_interval = 0.1
self       = <dimos.e2e_tests.lcm_spy.LcmSpy object at 0x7d0b09a162d0>
start_time = 1780790284.2720766
timeout    = 120

dimos/e2e_tests/lcm_spy.py:105: TimeoutError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants