Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

examples: use proper pyproject.toml setup for all python ones

Aperta
#985 1 commento 0 reazioni 2 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@jiwenc-nv ci sta già lavorando.

Dal 28/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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_xr namespace, relative imports, documented as python -m. Copies cleanly.
  • camera_viz and teleop_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 on sys.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.

Lingua principale
Python
Stelle
393
Fork
93
Merge medio
2g 5h
PR unite (30g)
95

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/IsaacCapture

Tutte le issue di NVIDIA/IsaacCapture

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.