console extra: declare viser + mj-viser deps (#162) - #163
Merged
Conversation
mj_manipulator/console.py soft-imports `viser` and `mj_viser` when `viser=True` is passed to start_console(), but neither was declared. Fresh `uv sync` skipped them — `--viser` failed with ModuleNotFoundError. Adds both to the [console] extra (the only entry point that triggers the soft import) and registers `mj-viser` as a workspace source so local dev resolves to the editable workspace member. Fixes #162
This was referenced May 28, 2026
mj_manipulator/primitives.py top-level imports `py_trees`, and primitives is part of the public API exposed by start_console() and elsewhere. So py_trees is a hard runtime requirement, not an optional extra. Moves `py_trees>=2.2` from the [bt] extra to main `dependencies`, and removes the [bt] extra entirely (no external consumers reference it in this workspace). Drops the redundant `mj-manipulator[bt]` self-reference from the [console] extra. Refs #162
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related fixes to make the CLI work on a fresh clone:
console.pysoft-imports them whenviser=True, but neither was declared.mj-viserwas also an orphan workspace member (nothing depended on it).primitives.pytop-level importspy_trees, and primitives is part of the public API exposed bystart_console(). So py_trees is a hard runtime requirement, not an optional[bt]extra. The[bt]extra is removed (no external consumers reference it in this workspace).Fixes #162
Test plan
uv sync --extra console --package mj-manipulatorinstalls viser + mj_viser (editable from workspace) and py_trees.uv run --package mj-manipulator python -c "import viser, mj_viser, py_trees"works.