examples: use proper pyproject.toml setup for all python ones
维护者通常 1 天内回复
@jiwenc-nv 已经在做这个了。
开始于 2026年8月28日。
评估
这个 Issue 还没有评估数据。
描述
Partner feedback on #736 (item 5): the Physical AI Developer team copied example code into their own project, hit import failures, and patched their copies with dual-mode import guards. Worth settling a convention rather than leaving each example to pick one.
Two conventions coexist under examples/:
mujoco_xr— its own wheel,isaacteleop_examples.mujoco_xrnamespace, relative imports, documented aspython -m. Copies cleanly.camera_vizandteleop_ros2/python— 21 files import siblings as top-level modules:from pipeline import ...,from sources import ...,from messages import ...,from geometry import .... These resolve only because the script's own directory lands onsys.path.
So the second group breaks under python -m, breaks the moment a file is copied into a package (what the partner hit), and squats on very generic top-level names — pipeline, sources, messages, constants, assets. examples/teleop_ros2/python/pyproject.toml already carries pythonpath = ["."] to keep pytest working around it.
Suggested direction: make both directories real packages with relative imports plus a -m entry point, matching mujoco_xr, and write the convention down for examples. I'd avoid adopting try: from .x / except ImportError: from x guards repo-wide — that doubles every import site to paper over an invocation mistake.
Cross-repo note: huggingface/lerobot's examples/isaac_teleop_to_so101/ uses files(__package__) (common.py:76) and relative imports. Its README documents python -m only, so it works as specified; recording it here for traceability.
- 主要语言
- Python
- 星标
- 393
- 派生
- 93
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 95
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/IsaacCapture 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
NVIDIA/IsaacCapture#910 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
NVIDIA/IsaacCapture#891 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
NVIDIA/IsaacCapture#1217 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 20/100
NVIDIA/IsaacCapture#1214 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 50/100
NVIDIA/IsaacCapture#1181 ·
维护者通常 1 天内回复
查看 NVIDIA/IsaacCapture 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
Deltares/imod-python#1940 ·
维护者通常 1 天内回复
-
effort: low prio: low ready
难度 1/5 1 小时以内 新手友好度 82/100
digitalfabrik/integreat-cms#4621 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
ioos/compliance-checker#1375 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复