[Wheel] Flatten the installed Isaac Lab package - #7438
Conversation
Greptile SummaryThe PR flattens the wheel’s core
Confidence Score: 4/5The console-entry regression should be fixed before merging because an installed-wheel command that previously generated VS Code settings now fails argument parsing. The flattened package and resource-root changes align with the staged source and wheel layouts, but directly targeting Files Needing Attention: tools/wheel_builder/gen_pyproject.py and tools/wheel_builder/res/main.py Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Source[Canonical core package] --> Stage[Wheel staging]
Resources[apps / source / tools] --> Stage
Stage --> Flat[Top-level isaaclab package]
Flat --> Root[ISAACLAB_ROOT resolution]
Root --> Runtime[CLI, AppLauncher, assets, benchmarks]
Entry[Console entry point] --> CLI[isaaclab.cli:cli]
Reviews (1): Last reviewed commit: "Flatten the installed Isaac Lab package" | Re-trigger Greptile |
| lines.append("") | ||
| lines.append("[project.scripts]") | ||
| lines.append('isaaclab = "isaaclab:main"') | ||
| lines.append('isaaclab = "isaaclab.cli:cli"') |
There was a problem hiding this comment.
Console compatibility dispatch is bypassed
When an installed-wheel user runs isaaclab --generate-vscode-settings, the changed entry point calls isaaclab.cli:cli directly, which rejects the legacy option instead of generating the settings.
| lines.append('isaaclab = "isaaclab.cli:cli"') | |
| lines.append('isaaclab = "isaaclab.__main__:main"') |
There was a problem hiding this comment.
Isaac Lab Review Bot
The wheel flattening and centralized resource-root resolution are coherent, but replacing the wheel initializer removes two existing top-level callables and therefore changes the installed API despite the PR’s non-breaking claim.
- Design and architecture: Staging the canonical package directly under
isaaclabremoves the runtime__path__mutation cleanly, and centralizing resource lookup throughISAACLAB_ROOTavoids layout-specific path arithmetic. The flattened package should retain compatibility shims for behavior previously supplied by the wheel wrapper. - API: The installed package loses
isaaclab.mainandisaaclab.bootstrap_kernelwhenres/__init__.pyis no longer copied. In particular,bootstrap_kernelwas explicitly documented as retained for backwards compatibility. These symbols need a deprecation-compatible migration rather than immediate removal. - Implementation: The build ordering, direct
isaaclab.cli:cliconsole entry point, and flat-layout smoke coverage are consistent with the packaging goal. However, the smoke test does not cover the removed top-level callables; thin delegating compatibility exports in the canonical initializer would preserve the existing installed-package surface.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
|
|
||
| # 2. Copy the custom res __init__.py and __main__.py | ||
| cp "$SELF_DIR/res/__init__.py" "$BUILD_DIR/src/isaaclab/" | ||
| # 2. Copy the custom __main__.py used by ``python -m isaaclab`` |
There was a problem hiding this comment.
🟡 Warning · Api — Wheel drops top-level main and bootstrap_kernel
The wheel no longer installs res/__init__.py, so the installed isaaclab package loses the top-level main() (previously the isaaclab:main entry-point target) and bootstrap_kernel(), which the deleted file explicitly retained for backwards compatibility. Wheel users doing from isaaclab import main or bootstrap_kernel now fail. Either keep thin delegating shims in the canonical initializer or record the removal and migration path in the changelog fragment.
|
run-ci |
Description
Install the core Isaac Lab modules directly in the wheel top-level
isaaclabpackage instead of exposingisaaclab/source/isaaclab/isaaclabby mutatingisaaclab.__path__.This change:
No public API changes or new dependencies are introduced.
Type of change
Release backport
developValidation
uv run --with pip env -u VIRTUAL_ENV python -m pytest source/isaaclab/test/install_ci/misc/test_wheel_builder_smoke.py -q(12 passed)isaaclab.__path__contains one package directorypython -m isaaclab, andisaaclab --helpAppLauncher,SimulationContext, and a real headless simulator startup/shutdownisaaclab_ov,isaaclab_rl, andisaaclab_teleop; this PR includes its requiredisaaclabfragment.Screenshots
Not applicable.
Checklist
source/isaaclab/changelog.d/CONTRIBUTORS.md