Skip to content

[Workflow] Move Isaac Lab implementation behind explicit public APIs - #7200

Closed
StafaH wants to merge 1 commit into
isaac-sim:developfrom
StafaH:feature/isaaclab-src-public-api
Closed

[Workflow] Move Isaac Lab implementation behind explicit public APIs#7200
StafaH wants to merge 1 commit into
isaac-sim:developfrom
StafaH:feature/isaaclab-src-public-api

Conversation

@StafaH

@StafaH StafaH commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Description

Moves the implementation of the isaaclab subpackages under isaaclab._src, following the public/private package structure used by Newton and MJWarp.

Public subpackages now expose an explicit, stub-defined API through lightweight lazy facades. Internal Isaac Lab imports and downstream workspace packages use _src only for implementation details that are not part of those facades. Package data paths, documentation references, and source-root discovery were updated for the new layout.

This is a breaking workflow/API cleanup: imports from concrete implementation modules must move to the nearest exported public package API. The changelog fragment documents the migration.

No new dependencies are required.

Type of change

  • Breaking change
  • Documentation update

Screenshots

Not applicable.

Validation

  • uv run isaaclab -f
  • uv run --isolated --extra test -- make -C docs current-docs
  • uv run --frozen pytest source/isaaclab/test/utils/test_module.py source/isaaclab/test/utils/test_configclass.py source/isaaclab/test/utils/test_string.py source/isaaclab/test/utils/test_dict.py source/isaaclab/test/utils/test_timer.py -q (91 passed)
  • uv run --frozen python -m compileall -q source scripts tools apps
  • Public facade import sweep across 86 packages
  • Built the isaaclab wheel and verified relocated Python modules, URDF data, and YAML data

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove the public API behavior
  • I have added a changelog fragment for every touched package
  • I have added my name to CONTRIBUTORS.md

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review (1863 files, 100 file limit).

@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request asset New asset feature or request isaac-mimic Related to Isaac Mimic team infrastructure labels Aug 20, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

The _src relocation and stub-driven lazy facades establish a coherent public/private split, but the transition removes previously importable concrete modules without the required deprecation period and exposes private cloner module objects under public names.

  • Design and architecture: The facade architecture and relocated implementation paths are internally consistent. However, compatibility delegates are needed at established module paths so the migration complies with the repository’s deprecation policy and public module objects retain public identities.
  • API: Previously importable and documented paths such as isaaclab.assets.articulation.articulation_cfg are now intentionally unavailable without prior deprecation. In addition, public isaaclab.cloner.path and isaaclab.cloner.query attributes resolve to modules whose identities remain under isaaclab._src; thin public forwarding modules should preserve both compatibility and public module identity.
  • Implementation: The lazy exporter correctly supports absolute named imports and caches resolved values, but exporting the private path and query module objects makes their __name__ values private and deterministically violates the existing cloner assertions. Compatibility modules at the old paths should warn and forward to the relocated implementation until a later removal.

Significant concerns. Posted 2 actionable findings inline.

The full PR diff was reviewed; some supplemental surrounding file context was omitted.

Automated review; human maintainers own approval decisions.

import isaaclab.cloner.query # noqa: PLC0415
from isaaclab.cloner.path import under # noqa: PLC0415
from isaaclab.cloner.query import path_to_source # noqa: PLC0415
import isaaclab._src.cloner.path # noqa: PLC0415

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Api — Preserve cloner module identity

These imports load isaaclab._src.cloner.path, whose __name__ is necessarily the private path, but the unchanged assertions require isaaclab.cloner.path. The facade likewise exports that private module object, so the test and public module identity fail deterministically. Keep public path and query delegate modules that forward their symbols instead of exposing the private module objects directly.

def test_implementation_module_is_not_available_through_public_namespace():
"""Implementation modules should only be importable below ``isaaclab._src``."""
code = """
import importlib.util

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Api — Preserve deprecated module imports

This added contract intentionally makes the existing isaaclab.assets.articulation.articulation_cfg import unavailable. Concrete modules were previously importable and documented, while repository policy requires prior deprecation before removing public APIs; a major changelog entry is not a compatibility period. Retain thin modules at the old paths that warn and re-export facade symbols, then remove them in a later release.

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahaha tough review. What's the timeline for this? Is this planned for GA? Lots of potential bugs in there. Maybe this is not aggressive enough? Why not move the backends modules (ov,newton,physx) to provide a similar interface. I see the code keeps the old modules and does some import re-directions is that the final plan? If that's the case I'm not sure this approach is fundamentally cleaner? Or is the PR missing the new public API?

Comment thread CONTRIBUTORS.md
* Mingxue Gu
* Mingyu Lee
* Muhong Guo
* Mustafa Haiderbhai

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add yourself in the maintainers :D

@StafaH
StafaH marked this pull request as draft August 20, 2026 23:31
@StafaH StafaH closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset New asset feature or request documentation Improvements or additions to documentation enhancement New feature or request infrastructure isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants