feat(wuji): unified wuji console entry for deploy toolchain - #238
Merged
Merged
Conversation
Replace the long `python -m genelab_wuji.deploy.scripts.<x>` invocations with a single `uv run wuji <command>` console script: wuji check | home -> hand_utils (read-only test / home ramp) wuji observer -> cube_world_observer (Hikvision -> ZMQ) wuji viewer -> toreal_viewer (real2sim mirror) wuji calib -> calib_check wuji play -> play_real (deploy control loop) - new `genelab_wuji.cli` dispatcher; each verb LAZILY imports its target module so `wuji play` doesn't pull in the camera SDK that the observer needs (the observer module raises at import without the MVS SDK) - `[project.scripts] wuji = genelab_wuji.cli:main` in the example pyproject - each script's `main()` now takes an `argv` list (was reading sys.argv) so the dispatcher can route args; `python -m ...` still works - README + script docstrings updated to `uv run wuji ...` - tests for verb routing, the shared check/home prefix, lazy import, and help/unknown exit codes Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
KraHsu
added a commit
that referenced
this pull request
Jul 10, 2026
feat(wuji): unified `wuji` console entry for deploy toolchain
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.
What
The deploy toolchain was invoked via long module paths (
python -m genelab_wuji.deploy.scripts.play_real …). Replace them with a singleuv run wuji <command>console script.wuji check/wuji homehand_utilswuji observercube_world_observerwuji viewertoreal_viewerwuji calibcalib_checkwuji playplay_realHow
genelab_wuji.clidispatcher. Each verb lazily imports its target module, sowuji playdoesn't pull in the Hikvision MVS SDK thatwuji observerneeds (the observer module raises at import time when the SDK is absent) and vice-versa.[project.scripts] wuji = "genelab_wuji.cli:main"inexamples/wuji/pyproject.toml.main()now takes anargvlist (was readingsys.argvdirectly) so the dispatcher can route args;check/homesharehand_utilsvia a prepended verb. The oldpython -m …entry points still work.uv run wuji ….Testing
tests/test_examples_wuji_cli.py: verb→module routing, shared check/home prefix, lazy import via stubbedimport_module, help/usage/unknown exit codes.46 passed(CLI + all deploy tests); ruff check + format clean.uv run wuji play --ckpt policy_DRv3b.onnx --mock --no-zmq --no-viewer --steps 2runs the closed loop (obs_dim=207, action_dim=20).🤖 Generated with Claude Code