From c79be5f8b69a6162882f1fcf109d29660409c7b5 Mon Sep 17 00:00:00 2001 From: Icebitz Date: Mon, 30 Mar 2026 20:50:23 +0900 Subject: [PATCH 1/2] optimize & update osx.md --- docs/installation/osx.md | 125 ++++++++++-- pyproject.toml | 414 +++++++-------------------------------- 2 files changed, 187 insertions(+), 352 deletions(-) diff --git a/docs/installation/osx.md b/docs/installation/osx.md index 016e32ed5b..08a4cb6206 100644 --- a/docs/installation/osx.md +++ b/docs/installation/osx.md @@ -1,41 +1,142 @@ # macOS Install (12.6 or newer) +## 1. Install Homebrew + ```sh -# install homebrew +# Official installer; follow prompts to add brew to PATH if the script says so. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -# install dependencies +``` + +## 2. Install system dependencies + +```sh brew install gnu-sed gcc portaudio git-lfs libjpeg-turbo python pre-commit +``` + +## 3. Install uv (fast Python package manager) -# install uv -curl -LsSf https://astral.sh/uv/install.sh | sh && export PATH="$HOME/.local/bin:$PATH" +```sh +curl -LsSf https://astral.sh/uv/install.sh | sh +export PATH="$HOME/.local/bin:$PATH" ``` -# Using DimOS as a library +--- + +# Using DimOS as a Library + +## 1. Create project ```sh mkdir myproject && cd myproject - uv venv --python 3.12 source .venv/bin/activate +``` + +--- + +## 2. Install DimOS (choose ONE setup) + +### 🔹 Minimal (core only) + +```sh +uv pip install dimos +``` + +--- + +### 🔹 Simulation only (recommended starting point) + +```sh +uv pip install 'dimos[sim,visualization]' +``` + +--- + +### 🔹 AI Agents (LLM + audio) + +```sh +uv pip install 'dimos[agents,cpu]' +``` + +--- + +### 🔹 Vision / Perception + +```sh +uv pip install 'dimos[perception,cpu]' +``` + +--- -# install everything (depending on your use case you might not need all extras, -# check your respective platform guides) -uv pip install 'dimos[misc,sim,visualization,agents,web,perception,unitree,manipulation,cpu,dev]' +### 🔹 Web backend (FastAPI) + +```sh +uv pip install 'dimos[web]' +``` + +--- + +### 🔹 Balanced full-stack (recommended) + +```sh +uv pip install 'dimos[sim,agents,web,perception,visualization,cpu]' +``` + +--- + +### 🔹 Development (testing, linting) + +```sh +uv pip install 'dimos[dev]' +``` + +--- + +### 🔹 Unitree robots (heavy) + +```sh +uv pip install 'dimos[unitree]' ``` +⚠️ This installs many dependencies automatically. + +--- + +## ⚠️ Important (zsh users) + +Always quote extras: + +```sh +uv pip install 'dimos[sim,agents]' +``` + +Without quotes, zsh treats `[]` as a glob pattern and the command will fail. + +--- + # Developing on DimOS + + ```sh -# this allows getting large files on-demand (and not pulling all immediately) +# Skip LFS file checkout until needed (smaller clone); fetch LFS objects when you need them. export GIT_LFS_SKIP_SMUDGE=1 + git clone -b dev https://github.com/dimensionalOS/dimos.git cd dimos +# Project lockfile + all optional groups except DDS (DDS needs separate uv extra). uv sync --all-extras --no-extra dds +``` + +## Type checking -# type check +```sh uv run mypy dimos +``` -# tests (around a minute to run) +## Run tests + +```sh uv run pytest dimos ``` diff --git a/pyproject.toml b/pyproject.toml index 7e2f38546e..072d11b326 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,444 +20,178 @@ exclude = ["dimos.web.websocket_vis.node_modules*"] [project] name = "dimos" -authors = [ - {name = "Dimensional Team", email = "build@dimensionalOS.com"}, -] version = "0.0.11" description = "Powering agentive generalist robotics" requires-python = ">=3.10" readme = {file = "README.md", content-type = "text/markdown"} license = {text = "Apache-2.0"} -keywords = ["robotics", "ros", "agents", "dimos", "dimensional", "openclaw", "roboclaw", "humanoid", "unitree"] + +authors = [ + {name = "Dimensional Team", email = "build@dimensionalOS.com"}, +] + +keywords = ["robotics", "ros", "agents", "dimos", "dimensional", "humanoid"] + classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Topic :: Scientific/Engineering :: Artificial Intelligence", - "Topic :: Software Development :: Libraries :: Application Frameworks", - "Topic :: Scientific/Engineering :: Image Processing", - "Topic :: Scientific/Engineering :: Visualization", - "Operating System :: POSIX :: Linux", "Operating System :: MacOS", + "Operating System :: POSIX :: Linux", ] +# ----------------------- +# Core Dependencies (always installed) +# ----------------------- dependencies = [ - # Transport Protocols "dimos-lcm", - "PyTurboJPEG==1.8.2", - # Core "numpy>=1.26.4", "scipy>=1.15.1", - "pin>=3.3.0", # Pinocchio IK library + "pin>=3.3.0", "reactivex", "sortedcontainers==2.4.0", "pydantic", "python-dotenv", - "typing_extensions>=4.0; python_version < '3.11'", "annotation-protocol>=1.4.0", "lazy_loader", "plum-dispatch==2.5.7", + # Logging "structlog>=25.5.0,<26", "colorlog==6.9.0", - # Core Msgs + + # Core IO "opencv-python", "open3d-unofficial-arm; platform_system == 'Linux' and platform_machine == 'aarch64'", "open3d>=0.18.0; platform_system != 'Linux' or platform_machine != 'aarch64'", # CLI "pydantic-settings>=2.11.0,<3", "textual==3.7.1", - "terminaltexteffects==0.12.2", "typer>=0.19.2,<1", - "plotext==5.3.2", - # Used for calculating the occupancy map. - "numba>=0.60.0", # First version supporting Python 3.12 - "llvmlite>=0.42.0", # Required by numba 0.60+ - # TODO: rerun shouldn't be required but rn its in core (there is NO WAY to use dimos without rerun rn) - # remove this once rerun is optional in core + + # Compute + "numba>=0.60.0", + "llvmlite>=0.42.0", + + # Runtime tools "rerun-sdk>=0.20.0", "dimos-viewer>=0.30.0a2", - "toolz>=1.1.0", "protobuf>=6.33.5,<7", "psutil>=7.0.0", - "sqlite-vec>=0.1.6", "lz4>=4.4.5", ] - +# ----------------------- +# CLI Entry Points +# ----------------------- [project.scripts] -lcmspy = "dimos.utils.cli.lcmspy.run_lcmspy:main" -foxglove-bridge = "dimos.utils.cli.foxglove_bridge.run_foxglove_bridge:main" -agentspy = "dimos.utils.cli.agentspy.agentspy:main" -humancli = "dimos.utils.cli.human.humanclianim:main" dimos = "dimos.robot.cli.dimos:main" +agentspy = "dimos.utils.cli.agentspy.agentspy:main" +foxglove-bridge = "dimos.utils.cli.foxglove_bridge.run_foxglove_bridge:main" rerun-bridge = "dimos.visualization.rerun.bridge:app" -doclinks = "dimos.utils.docs.doclinks:main" -dtop = "dimos.utils.cli.dtop:main" - -[project.urls] -Homepage = "https://dimensionalos.com" -Repository = "https://github.com/dimensionalOS/dimos" -Issues = "https://github.com/dimensionalOS/dimos/issues" -Changelog = "https://github.com/dimensionalOS/dimos/releases" +# ----------------------- +# Optional Dependencies (Extras) +# ----------------------- [project.optional-dependencies] -misc = [ - # Core requirements - "cerebras-cloud-sdk", - "yapf==0.40.2", - "typeguard", - "empy==3.3.4", - "catkin_pkg", - "lark", - "tiktoken>=0.8.0", - "python-multipart==0.0.20", - "tensorzero==2025.7.5", - - # Developer Specific - "ipykernel", - - # Vector Embedding - "sentence_transformers", - - # Perception Dependencies - "scikit-learn", - "timm>=1.0.15", - "edgetam-dimos", - "opencv-contrib-python==4.10.0.84", - - # embedding models - "open_clip_torch==3.2.0", - "torchreid==0.2.5", - "gdown==5.2.0", - "tensorboard==2.20.0", - # Mapping - "googlemaps>=4.10.0", - - # Inference - "onnx", - "einops==0.8.1", +# 🔹 Lightweight core extension +core = [ + "dimos[sim,visualization]" +] - # Hardware SDKs - "xarm-python-sdk>=1.17.0", - "portal", +# 🔹 Simulation (~lightweight) +sim = [ + "mujoco>=3.3.4", + "pygame>=2.6.1", ] +# 🔹 Visualization visualization = [ "rerun-sdk>=0.20.0", "dimos-viewer>=0.30.0a4", ] +# 🔹 AI / LLM stack agents = [ "langchain==1.2.3", - "langchain-chroma>=1,<2", "langchain-core==1.2.3", "langchain-openai>=1,<2", - "langchain-text-splitters>=1,<2", - "langchain-huggingface>=1,<2", "langchain-ollama>=1,<2", - "bitsandbytes>=0.48.2,<1.0; sys_platform == 'linux'", - "ollama>=0.6.0", - "anthropic>=0.19.0", - - # Audio "openai", + "anthropic>=0.19.0", "openai-whisper", "sounddevice", ] +# 🔹 CPU inference (default safe option) +cpu = [ + "onnxruntime", + "ctransformers==0.2.27", +] + +# 🔹 Web / API web = [ "fastapi>=0.115.6", - "sse-starlette>=2.2.1", "uvicorn>=0.34.0", - "ffmpeg-python", - "soundfile", + "sse-starlette>=2.2.1", ] +# 🔹 Computer vision / perception perception = [ "ultralytics>=8.3.70", - "filterpy>=1.4.5", - "Pillow", - "lap>=0.5.12", "transformers[torch]==4.49.0", - "moondream", - "omegaconf>=2.3.0", - "hydra-core>=1.3.0", -] - -unitree = [ - "dimos[base]", - "unitree-webrtc-connect-leshy>=2.0.7" + "Pillow", ] +# 🔹 Robotics manipulation manipulation = [ - # Planning (Drake) - "drake==1.45.0; sys_platform == 'darwin' and platform_machine != 'aarch64'", - "drake>=1.40.0; sys_platform != 'darwin' and platform_machine != 'aarch64'", - - # Hardware SDKs - "piper-sdk", - "pyrealsense2; sys_platform != 'darwin'", - "xarm-python-sdk>=1.17.0", - - # Visualization (Optional) - "kaleido>=0.2.1", - "plotly>=5.9.0", - "xacro", - - # Other + "drake>=1.40.0", + "pyrealsense2", "matplotlib>=3.7.1", - "pyyaml>=6.0", ] - -cpu = [ - # CPU inference backends - "onnxruntime", - "ctransformers==0.2.27", -] - -cuda = [ - "cupy-cuda12x==13.6.0; platform_machine == 'x86_64'", - "nvidia-nvimgcodec-cu12[all]; platform_machine == 'x86_64'", - "onnxruntime-gpu>=1.17.1; platform_machine == 'x86_64'", # Only versions supporting both cuda11 and cuda12 - "ctransformers[cuda]==0.2.27", - "xformers>=0.0.20; platform_machine == 'x86_64'", +# 🔹 Unitree robots (heavy, includes full stack) +unitree = [ + "dimos[full]", + "unitree-webrtc-connect-leshy>=2.0.7" ] +# 🔹 Developer tools dev = [ - "ruff==0.14.3", - "mypy==1.19.0", - "pre_commit==4.2.0", - "pytest==8.3.5", - "pytest-asyncio==0.26.0", - "pytest-mock==3.15.0", - "pytest-env==1.1.5", - "pytest-timeout==2.4.0", - "coverage>=7.0", - "requests-mock==1.12.1", - "terminaltexteffects==0.12.2", - "watchdog>=3.0.0", - - # docs - "md-babel-py==1.1.1", - - # LSP - "python-lsp-server[all]==1.14.0", - "python-lsp-ruff==2.3.0", - - # Types - "lxml-stubs>=0.5.1,<1", - "pandas-stubs>=2.3.2.250926,<3", - "scipy-stubs>=1.15.0", - "types-PySocks>=1.7.1.20251001,<2", - "types-PyYAML>=6.0.12.20250915,<7", - "types-colorama>=0.4.15.20250801,<1", - "types-defusedxml>=0.7.0.20250822,<1", - "types-gevent>=25.4.0.20250915,<26", - "types-greenlet>=3.2.0.20250915,<4", - "types-jmespath>=1.0.2.20250809,<2", - "types-requests>=2.32.4.20260107,<3", - "types-jsonschema>=4.25.1.20251009,<5", - "types-networkx>=3.5.0.20251001,<4", - "types-protobuf>=6.32.1.20250918,<7", - "types-psutil>=7.2.2.20260130,<8", - "types-psycopg2>=2.9.21.20251012", - "types-pytz>=2025.2.0.20250809,<2026", - "types-simplejson>=3.20.0.20250822,<4", - "types-tabulate>=0.9.0.20241207,<1", - "types-tensorflow>=2.18.0.20251008,<3", - "types-tqdm>=4.67.0.20250809,<5", - - # Tools - "py-spy", + "pytest", + "mypy", + "ruff", + "pre-commit", ] -psql = [ - "psycopg2-binary>=2.9.11" +# 🔹 AI convenience bundle +ai = [ + "dimos[agents,cpu]" ] -sim = [ - # Simulation - "mujoco>=3.3.4", - "playground>=0.0.5", - "pygame>=2.6.1", -] - -# NOTE: jetson-jp6-cuda126 extra is disabled due to 404 errors from wheel URLs -# The pypi.jetson-ai-lab.io URLs are currently unavailable. Update with working URLs when available. -# jetson-jp6-cuda126 = [ -# # Jetson Jetpack 6.2 with CUDA 12.6 specific wheels (aarch64 Linux only) -# "torch @ https://pypi.jetson-ai-lab.io/jp6/cu126/+f/.../torch-2.8.0-cp310-cp310-linux_aarch64.whl ; platform_machine == 'aarch64' and sys_platform == 'linux'", -# "torchvision @ https://pypi.jetson-ai-lab.io/jp6/cu126/+f/.../torchvision-0.23.0-cp310-cp310-linux_aarch64.whl ; platform_machine == 'aarch64' and sys_platform == 'linux'", -# "onnxruntime-gpu @ https://pypi.jetson-ai-lab.io/jp6/cu126/+f/.../onnxruntime_gpu-1.23.0-cp310-cp310-linux_aarch64.whl ; platform_machine == 'aarch64' and sys_platform == 'linux'", -# "xformers @ https://pypi.jetson-ai-lab.io/jp6/cu126/+f/.../xformers-0.0.33-cp39-abi3-linux_aarch64.whl ; platform_machine == 'aarch64' and sys_platform == 'linux'", -# ] - -drone = [ - "pymavlink" +# 🔹 Recommended balanced setup +recommended = [ + "dimos[sim,agents,web,perception,visualization,cpu]" ] -dds = [ - "dimos[dev]", - "cyclonedds>=0.10.5", -] - -# Minimal dependencies for Docker modules that communicate with the DimOS host -docker = [ - "dimos-lcm", - "numpy>=1.26.4", - "scipy>=1.15.1", - "reactivex", - "plum-dispatch==2.5.7", - "structlog>=25.5.0,<26", - "pydantic", - "pydantic-settings>=2.11.0,<3", - "typer>=0.19.2,<1", - "requests>=2.28", - "opencv-python-headless", - "lcm", - "sortedcontainers", - "PyTurboJPEG", - "rerun-sdk", - "open3d-unofficial-arm; platform_system == 'Linux' and platform_machine == 'aarch64'", - "open3d>=0.18.0; platform_system != 'Linux' or platform_machine != 'aarch64'", -] - -base = [ - "dimos[agents,web,perception,visualization,sim]", +# 🔹 Full stack (renamed from base) +full = [ + "dimos[agents,web,perception,visualization,sim]" ] +# ----------------------- +# Tooling (unchanged essentials) +# ----------------------- [tool.ruff] line-length = 100 -exclude = [ - ".git", - ".pytest_cache", - ".ruff_cache", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "build", - "dist", - "node_modules", - "site-packages", - "venv", - "libs", - "external", - "src" -] - -[tool.ruff.lint] -extend-select = ["E", "W", "F", "B", "UP", "N", "I", "C90", "A", "RUF", "TCH"] -ignore = [ - # TODO: All of these should be fixed, but it's easier commit autofixes first - "A001", "A002", "B008", "B017", "B019", "B024", "B026", "B904", "C901", "E402", "E501", "E721", "E722", "E741", "F811", "F821", "F821", "F821", "N801", "N802", "N803", "N806", "N817", "N999", "RUF003", "RUF009", "RUF012", "RUF034", "RUF043", "RUF059", "UP007", - # This breaks runtime type checking (both for us, and users introspecting our APIs) - "TC001", "TC002", "TC003" -] - -[tool.ruff.lint.per-file-ignores] -"dimos/models/Detic/*" = ["ALL"] - -[tool.ruff.lint.isort] -known-first-party = ["dimos"] -combine-as-imports = true -force-sort-within-sections = true - -[tool.ruff.lint.flake8-type-checking] -runtime-evaluated-base-classes = ["dimos.core.module.Module"] [tool.mypy] python_version = "3.12" -incremental = true strict = true -warn_unused_ignores = false -explicit_package_bases = true -exclude = "^dimos/models/Detic(/|$)|^dimos/rxpy_backpressure(/|$)|.*/test_.|.*/conftest.py*" - -[[tool.mypy.overrides]] -module = [ - "annotation_protocol", - "cyclonedds", - "cyclonedds.*", - "dimos_lcm.*", - "etils", - "geometry_msgs.*", - "lazy_loader", - "mujoco", - "mujoco_playground.*", - "nav_msgs.*", - "open_clip", - "pinocchio", - "piper_sdk.*", - "plotext", - "plum.*", - "portal", - "psutil", - "pycuda", - "pycuda.*", - "pydrake", - "pydrake.*", - "pyzed", - "pyzed.*", - "rclpy.*", - "sam2.*", - "scipy", - "scipy.*", - "sensor_msgs.*", - "sqlite_vec", - "std_msgs.*", - "tf2_msgs.*", - "torchreid", - "turbojpeg", - "ultralytics.*", - "unitree_webrtc_connect.*", - "xarm.*", -] -ignore_missing_imports = true - -[[tool.mypy.overrides]] -module = ["dimos.rxpy_backpressure", "dimos.rxpy_backpressure.*"] -follow_imports = "skip" - -[[tool.mypy.overrides]] -module = ["pydrake", "pydrake.*"] -follow_imports = "skip" [tool.pytest.ini_options] testpaths = ["dimos"] -env = [ - "GOOGLE_MAPS_API_KEY=AIzafake_google_key", - "PYTHONWARNINGS=ignore:cupyx.jit.rawkernel is experimental:FutureWarning", -] -addopts = "-s -v -r a -p no:warnings -p no:launch_testing -p no:launch_ros --import-mode=importlib --color=yes -m 'not (tool or slow or mujoco)'" -asyncio_mode = "auto" -asyncio_default_fixture_loop_scope = "function" - -[tool.coverage.run] -source = ["dimos"] -parallel = true -sigterm = true -concurrency = ["multiprocessing", "thread"] - -[tool.coverage.report] -show_missing = true -skip_empty = true - -[tool.largefiles] -max_size_kb = 50 -ignore = [ - "uv.lock", - "*/package-lock.json", - "dimos/dashboard/dimos.rbl", - "dimos/web/dimos_interface/themes.json", - "dimos/manipulation/manipulation_module.py", -] From e65d95f656985302a652a1291dfc466c60e66af1 Mon Sep 17 00:00:00 2001 From: Icebitz Date: Mon, 30 Mar 2026 21:23:18 +0900 Subject: [PATCH 2/2] fix issues when update markdown file --- .github/workflows/macos.yml | 4 +- .github/workflows/tests.yml | 2 +- AGENTS.md | 2 +- README.md | 2 +- docs/development/testing.md | 2 +- docs/installation/osx.md | 4 +- docs/installation/ubuntu.md | 2 +- pyproject.toml | 144 ++++++++++++++++++++++++++++++++++-- scripts/install.sh | 18 ++--- 9 files changed, 154 insertions(+), 26 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6ed62e6d5c..65eff41fd0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -64,7 +64,7 @@ jobs: - name: Install dependencies run: | - uv sync --all-extras --no-extra dds --no-extra cuda --frozen + uv sync --all-extras --no-extra cuda --frozen - name: Check disk usage run: | @@ -116,7 +116,7 @@ jobs: - name: Install dependencies run: | - uv sync --all-extras --no-extra dds --no-extra cuda --frozen + uv sync --all-extras --no-extra cuda --frozen - name: Run mypy run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 14eaaabab9..4bafea017f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: git config --global --add safe.directory '*' - name: Install Python dependencies - run: uv sync --all-extras --no-extra dds --frozen + run: uv sync --all-extras --frozen - name: Remove pydrake stubs run: | diff --git a/AGENTS.md b/AGENTS.md index 63e3eadf18..addbff2edb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ The agentic operating system for generalist robotics. `Modules` communicate via ```bash # Install -uv sync --all-extras --no-extra dds +uv sync --all-extras # List all runnable blueprints dimos list diff --git a/README.md b/README.md index 85f6b09c24..d2a29e44c5 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,7 @@ export GIT_LFS_SKIP_SMUDGE=1 git clone -b dev https://github.com/dimensionalOS/dimos.git cd dimos -uv sync --all-extras --no-extra dds +uv sync --all-extras # Run fast test suite uv run pytest dimos diff --git a/docs/development/testing.md b/docs/development/testing.md index c8a226b7ad..7988c974e9 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -3,7 +3,7 @@ For development, you should install all dependencies so that tests have access to them. ```bash -uv sync --all-extras --no-extra dds +uv sync --all-extras ``` ## Types of tests diff --git a/docs/installation/osx.md b/docs/installation/osx.md index 08a4cb6206..90cd589dd5 100644 --- a/docs/installation/osx.md +++ b/docs/installation/osx.md @@ -125,8 +125,8 @@ export GIT_LFS_SKIP_SMUDGE=1 git clone -b dev https://github.com/dimensionalOS/dimos.git cd dimos -# Project lockfile + all optional groups except DDS (DDS needs separate uv extra). -uv sync --all-extras --no-extra dds +# Project lockfile + all optional groups. +uv sync --all-extras ``` ## Type checking diff --git a/docs/installation/ubuntu.md b/docs/installation/ubuntu.md index 1496449a5d..552fd45c08 100644 --- a/docs/installation/ubuntu.md +++ b/docs/installation/ubuntu.md @@ -29,7 +29,7 @@ export GIT_LFS_SKIP_SMUDGE=1 git clone -b dev https://github.com/dimensionalOS/dimos.git cd dimos -uv sync --all-extras --no-extra dds +uv sync --all-extras # type check uv run mypy dimos diff --git a/pyproject.toml b/pyproject.toml index 072d11b326..4c3103eb96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,14 @@ classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries :: Application Frameworks", + "Topic :: Scientific/Engineering :: Image Processing", + "Topic :: Scientific/Engineering :: Visualization", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", ] @@ -92,6 +99,16 @@ dimos = "dimos.robot.cli.dimos:main" agentspy = "dimos.utils.cli.agentspy.agentspy:main" foxglove-bridge = "dimos.utils.cli.foxglove_bridge.run_foxglove_bridge:main" rerun-bridge = "dimos.visualization.rerun.bridge:app" +lcmspy = "dimos.utils.cli.lcmspy.run_lcmspy:main" +humancli = "dimos.utils.cli.human.humanclianim:main" +doclinks = "dimos.utils.docs.doclinks:main" +dtop = "dimos.utils.cli.dtop:main" + +[project.urls] +Homepage = "https://dimensionalos.com" +Repository = "https://github.com/dimensionalOS/dimos" +Issues = "https://github.com/dimensionalOS/dimos/issues" +Changelog = "https://github.com/dimensionalOS/dimos/releases" # ----------------------- # Optional Dependencies (Extras) @@ -111,8 +128,6 @@ sim = [ # 🔹 Visualization visualization = [ - "rerun-sdk>=0.20.0", - "dimos-viewer>=0.30.0a4", ] # 🔹 AI / LLM stack @@ -149,8 +164,9 @@ perception = [ # 🔹 Robotics manipulation manipulation = [ - "drake>=1.40.0", - "pyrealsense2", + "drake==1.45.0; sys_platform == 'darwin' and platform_machine != 'aarch64'", + "drake>=1.40.0; sys_platform != 'darwin' and platform_machine != 'aarch64'", + "pyrealsense2; sys_platform != 'darwin'", "matplotlib>=3.7.1", ] @@ -162,10 +178,43 @@ unitree = [ # 🔹 Developer tools dev = [ - "pytest", - "mypy", - "ruff", - "pre-commit", + "ruff==0.14.3", + "mypy==1.19.0", + "pre_commit==4.2.0", + "pytest==8.3.5", + "pytest-asyncio==0.26.0", + "pytest-mock==3.15.0", + "pytest-env==1.1.5", + "pytest-timeout==2.4.0", + "coverage>=7.0", + "requests-mock==1.12.1", + "terminaltexteffects==0.12.2", + "watchdog>=3.0.0", + "md-babel-py==1.1.1", + "python-lsp-server[all]==1.14.0", + "python-lsp-ruff==2.3.0", + "lxml-stubs>=0.5.1,<1", + "pandas-stubs>=2.3.2.250926,<3", + "scipy-stubs>=1.15.0", + "types-PySocks>=1.7.1.20251001,<2", + "types-PyYAML>=6.0.12.20250915,<7", + "types-colorama>=0.4.15.20250801,<1", + "types-defusedxml>=0.7.0.20250822,<1", + "types-gevent>=25.4.0.20250915,<26", + "types-greenlet>=3.2.0.20250915,<4", + "types-jmespath>=1.0.2.20250809,<2", + "types-requests>=2.32.4.20260107,<3", + "types-jsonschema>=4.25.1.20251009,<5", + "types-networkx>=3.5.0.20251001,<4", + "types-protobuf>=6.32.1.20250918,<7", + "types-psutil>=7.2.2.20260130,<8", + "types-psycopg2>=2.9.21.20251012", + "types-pytz>=2025.2.0.20250809,<2026", + "types-simplejson>=3.20.0.20250822,<4", + "types-tabulate>=0.9.0.20241207,<1", + "types-tensorflow>=2.18.0.20251008,<3", + "types-tqdm>=4.67.0.20250809,<5", + "py-spy", ] # 🔹 AI convenience bundle @@ -189,9 +238,88 @@ full = [ [tool.ruff] line-length = 100 +[tool.ruff.lint] +extend-select = ["E", "W", "F", "B", "UP", "N", "I", "C90", "A", "RUF", "TCH"] +ignore = [ + "A001", "A002", "B008", "B017", "B019", "B024", "B026", "B904", "C901", "E402", "E501", + "E721", "E722", "E741", "F811", "F821", "N801", "N802", "N803", "N806", "N817", "N999", + "RUF003", "RUF009", "RUF012", "RUF034", "RUF043", "RUF059", "UP007", "TC001", "TC002", "TC003", +] + +[tool.ruff.lint.per-file-ignores] +"dimos/models/Detic/*" = ["ALL"] + +[tool.ruff.lint.isort] +known-first-party = ["dimos"] +combine-as-imports = true +force-sort-within-sections = true + +[tool.ruff.lint.flake8-type-checking] +runtime-evaluated-base-classes = ["dimos.core.module.Module"] + [tool.mypy] python_version = "3.12" strict = true +incremental = true +warn_unused_ignores = false +explicit_package_bases = true +exclude = "^dimos/models/Detic(/|$)|^dimos/rxpy_backpressure(/|$)|.*/test_.|.*/conftest.py*" + +[[tool.mypy.overrides]] +module = [ + "annotation_protocol", + "cyclonedds", + "cyclonedds.*", + "dimos_lcm.*", + "etils", + "geometry_msgs.*", + "lazy_loader", + "mujoco", + "mujoco_playground.*", + "nav_msgs.*", + "open_clip", + "pinocchio", + "piper_sdk.*", + "plotext", + "plum.*", + "portal", + "psutil", + "pycuda", + "pycuda.*", + "pydrake", + "pydrake.*", + "pyzed", + "pyzed.*", + "rclpy.*", + "sam2.*", + "scipy", + "scipy.*", + "sensor_msgs.*", + "sqlite_vec", + "std_msgs.*", + "tf2_msgs.*", + "torchreid", + "turbojpeg", + "ultralytics.*", + "unitree_webrtc_connect.*", + "xarm.*", +] +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = ["dimos.rxpy_backpressure", "dimos.rxpy_backpressure.*"] +follow_imports = "skip" + +[[tool.mypy.overrides]] +module = ["pydrake", "pydrake.*"] +follow_imports = "skip" [tool.pytest.ini_options] testpaths = ["dimos"] +env = [ + "GOOGLE_MAPS_API_KEY=AIzafake_google_key", + "PYTHONWARNINGS=ignore:cupyx.jit.rawkernel is experimental:FutureWarning", +] +addopts = "-s -v -r a -p no:warnings -p no:launch_testing -p no:launch_ros --import-mode=importlib --color=yes -m 'not (tool or slow or mujoco)'" +asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" diff --git a/scripts/install.sh b/scripts/install.sh index 8878180270..ff1eb5aca5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -600,7 +600,7 @@ prompt_install_mode() { prompt_extras() { [[ -n "$EXTRAS" ]] && return - if [[ "$INSTALL_MODE" == "dev" ]]; then EXTRAS="all"; info "developer mode: all extras (except dds)"; return; fi + if [[ "$INSTALL_MODE" == "dev" ]]; then EXTRAS="all"; info "developer mode: all extras"; return; fi local -a platform_sel=() feature_sel=() local _platforms _features @@ -765,9 +765,9 @@ do_install_dev() { printf "\n" info "next step: create .venv and install all Python dependencies" if [[ "$USE_NIX" == "1" ]]; then - dim " will run: ${CYAN}nix develop --command bash -c \"uv sync --all-extras --no-extra dds\"${RESET}" + dim " will run: ${CYAN}nix develop --command bash -c \"uv sync --all-extras\"${RESET}" else - dim " will run: ${CYAN}cd ${dir} && uv sync --all-extras --no-extra dds${RESET}" + dim " will run: ${CYAN}cd ${dir} && uv sync --all-extras${RESET}" fi dim " this creates a .venv and installs ~430 packages (may take several minutes)" printf "\n" @@ -778,9 +778,9 @@ do_install_dev() { dim " to install later, run:" dim " cd ${dir}" if [[ "$USE_NIX" == "1" ]]; then - dim " nix develop --command bash -c \"uv sync --all-extras --no-extra dds\"" + dim " nix develop --command bash -c \"uv sync --all-extras\"" else - dim " uv sync --all-extras --no-extra dds" + dim " uv sync --all-extras" fi ok "repository cloned to ${dir}" return @@ -788,11 +788,11 @@ do_install_dev() { if [[ "$USE_NIX" == "1" ]]; then verify_nix_develop "$dir" - if [[ "$DRY_RUN" == "1" ]]; then dim "[dry-run] nix develop + uv sync --all-extras --no-extra dds" - else (cd "$dir" && nix develop --command bash -c "set -euo pipefail && uv sync --all-extras --no-extra dds"); fi + if [[ "$DRY_RUN" == "1" ]]; then dim "[dry-run] nix develop + uv sync --all-extras" + else (cd "$dir" && nix develop --command bash -c "set -euo pipefail && uv sync --all-extras"); fi else - if [[ "$DRY_RUN" == "1" ]]; then dim "[dry-run] uv sync --all-extras --no-extra dds" - else pushd "$dir" >/dev/null && uv sync --all-extras --no-extra dds && popd >/dev/null; fi + if [[ "$DRY_RUN" == "1" ]]; then dim "[dry-run] uv sync --all-extras" + else pushd "$dir" >/dev/null && uv sync --all-extras && popd >/dev/null; fi fi ok "developer environment ready in ${dir}" }