Clean up sub module packaging and remove setup.py#5785
Conversation
There was a problem hiding this comment.
Review Summary
This is a well-structured migration from setup.py to pyproject.toml for all 15 Isaac Lab packages. The changes follow modern Python packaging standards and simplify dependency management.
✅ What Looks Good
-
Consistent build system: All packages use
setuptools>=70.0,<82.0.0withwheel— good for reproducibility. -
tomllibmigration: Replacing the third-partytomlpackage with stdlibtomllib(Python 3.11+) removes an undeclared dependency. The binary mode file handling ("rb") is correctly implemented. -
Simplified version detection: The
importlib.metadataapproach is the modern standard and eliminates the need to parseextension.tomlat import time. -
Root
pyproject.tomlenhancement: The[tool.uv.sources]section for editable path dependencies enables cleanuv syncworkflows. -
Missing package fix: Adding
isaaclab-ppispto the root dependencies addresses a gap in the previous setup. -
Test updates: Tests correctly updated to reference
pyproject.tomlinstead ofsetup.py.
📋 Observations (Non-Blocking)
-
Python version inconsistency: Most packages require
>=3.12, butisaaclab_ovphysx/pyproject.tomlspecifiesrequires-python = ">=3.11". Is this intentional for broader ovphysx compatibility, or should it align with>=3.12? -
Removed module constants: Several packages previously exported constants like:
ISAACLAB_EXT_DIR,ISAACLAB_ASSETS_EXT_DIR, etc.ISAACLAB_METADATA,ISAACLAB_ASSETS_METADATA, etc.
These are no longer available. If any external code or user scripts depended on these constants, they'll encounter
AttributeError. Consider documenting this as a breaking change in the changelog, or adding deprecation stubs that emit warnings. -
Dependency flexibility changes: Some exact pins became ranges:
hidapi==0.14.0.post2→hidapi>=0.14.0gymnasium==1.2.1→gymnasium>=1.2.0prettytable==3.3.0→prettytable>=3.3.0h5py==3.15.1→h5py>=3.15.0- etc.
This is generally a positive change for compatibility, but worth noting for the release notes.
-
install.pybackward compatibility: The updated check at line 518:if not item.is_dir() or not ((item / "pyproject.toml").exists() or (item / "setup.py").exists()):
This maintains backward compatibility — nice touch for transitional installs.
-
Silent version fallback: The
"0.0.0"fallback onPackageNotFoundErroris fine for development, but could silently mask installation issues in production. Consider logging a warning when falling back.
⚠️ CI Note
The "Check changelog fragments" check is failing. Make sure to add a changelog fragment for this PR before merging.
Verdict
The migration is clean and follows best practices. The pending Installation Tests (conda/uv) will be important to verify the new packaging works end-to-end. Once CI is green and the changelog fragment is added, this should be good to merge.
Update (b71929a): The author has addressed the CI changelog fragment issue by adding:
-
mh-pyproject_rework.rstinsource/isaaclab/changelog.d/— Documents the key changes:- Replacing third-party
tomldependency with stdlibtomllib - Migrating package build from
setup.pytopyproject.tomlonly
- Replacing third-party
-
.skipfiles added to 11 other submodules (isaaclab_assets,isaaclab_contrib,isaaclab_experimental,isaaclab_mimic,isaaclab_newton,isaaclab_ov,isaaclab_ovphysx,isaaclab_physx,isaaclab_rl,isaaclab_tasks,isaaclab_teleop) — indicating no changelog entry needed for these packages as the changes are internal build-only.
✅ The changelog concern from my initial review is now resolved. This should unblock the CI check.
Update (f1d427e): Significant improvements in this push! The author has addressed my earlier observation about removed module constants:
✅ Module Constants Restored
The ISAACLAB_EXT_DIR and ISAACLAB_METADATA constants (and equivalents in other packages) are now restored with the new tomllib-based implementation:
| Package | Constants Restored |
|---|---|
isaaclab |
ISAACLAB_EXT_DIR, ISAACLAB_METADATA |
isaaclab_assets |
ISAACLAB_ASSETS_EXT_DIR, ISAACLAB_ASSETS_DATA_DIR, ISAACLAB_ASSETS_METADATA |
isaaclab_contrib |
ISAACLAB_CONTRIB_EXT_DIR, ISAACLAB_CONTRIB_METADATA |
isaaclab_tasks |
ISAACLAB_TASKS_EXT_DIR, ISAACLAB_TASKS_METADATA |
This addresses the backward compatibility concern from my initial review. 👍
Other Changes
-
Python version fixed:
isaaclab_ovphysxnow requires>=3.12(was>=3.11) — aligns with the rest of the packages ✅ -
Extra names normalized (Breaking): The underscore aliases for extras are removed:
rsl_rl→ usersl-rlrl_games→ userl-games
A changelog fragment (
isaaclab_rl/changelog.d/mh-pyproject_rework.rst) properly documents this PEP 685 normalization. Users will need to update their install commands. -
Test cleanup: Removed redundant test cases checking for underscore-aliased extras.
-
Version mismatch safety: The changelog CLI (
tools/changelog/cli.py) now validates thatconfig/extension.tomlandpyproject.tomlversions match before compiling — good safeguard against accidental version drift. -
Changelog updated: The main
isaaclabchangelog entry now documents thatISAACLAB_EXT_DIRandISAACLAB_METADATAare preserved usingtomllib.
Verdict
This push resolves all my previous observations. The migration is now complete with proper backward compatibility for exported constants. Ready to merge once CI passes.
Update (449f409): This push refines CI and dependency management:
Changes
-
Test dependencies moved to optional extra: Test packages (
pytest,pytest-mock,junitparser,flatdict>=4.1.0,flaky) are now in[project.optional-dependencies.test]instead of basedependencies. Install withpip install isaaclab[test]for the full test environment. -
CI workflow updated: The GitHub Actions workflow (
.github/actions/run-tests/action.yml) now explicitly installs test dependencies before running tests, ensuring CI works with the slimmer base package. -
Isaac Sim version bump:
isaacsim[all,extscache]constraint changed from==5.1.0to>=6.0.0— prepares for upcoming Isaac Sim 6.x compatibility. -
Removed
typing_extensions: Thetyping_extensions>=4.14.0dependency was removed from base requirements. -
Changelog updated: Documents the test extras change with install instructions.
✅ Good Practice
Moving test dependencies to an optional extra is the right call — it keeps the base install lean for production deployments while still making the full test suite available via pip install isaaclab[test].
Verdict
Clean incremental update. The Isaac Sim 6.x version bump is notable for downstream compatibility. Ready to merge once CI passes.
Update (b4d5c38): This push removes legacy OVRTX 0.2.x code paths from the isaaclab_ov package:
Changes
-
License metadata update:
typing_extensionslicense updated fromPSF-2.0toPython Software Foundation Licensewith corrected commentPSFL / OSRB. -
OVRTX 0.3.0+ now required: The renderer now assumes OVRTX ≥0.3.0:
- Removed
_OVRTX_VERSIONand_IS_OVRTX_0_3_0_OR_NEWERversion checks read_gpu_transforms=Trueis now unconditionalopen_usd_from_string()is the only USD loading path (removedadd_usd()file-based fallback)reset_stage()replaces manualremove_usd()handle cleanup
- Removed
-
Removed legacy kernels from
ovrtx_renderer_kernels.py:extract_all_depth_tiles_kernel_legacy(2D depth buffer)generate_random_colors_from_ids_kernel_legacy(2D ID buffer)
The 3D-buffer variants are now the only implementation.
-
Simplified
create_scene_partition_attributes(): Removedenable_scene_partition_workaroundparameter (was for OVRTX 0.2.x primvar inheritance issues). Now only setsomni:scenePartitionon Camera prims. -
Changelog fragment added:
remove-legacy-ovrtx-code-path.rstdocuments the removal. -
Test cleanup: Removed test classes
TestExtractAllDepthTilesKernelLegacyandTestRandomColorsFromIdsKernelLegacy(~160 lines).
✅ Assessment
This is a clean deprecation of legacy code paths. The version gating was adding maintenance overhead with minimal benefit since OVRTX 0.3.0+ is the supported baseline. Removing ~300 lines of compatibility code improves maintainability.
Verdict
Ready to merge once CI passes. The changes are all internal to isaaclab_ov and don't affect the public API.
Update (ee4b962): Minor CI fix:
Changes
flatdictversion pin relaxed: In.github/actions/run-tests/action.yml, the test dependencyflatdict>=4.1.0changed to justflatdict(unpinned).
Assessment
This is a trivial cleanup — the minimum version constraint was unnecessary since flatdict has been stable for years. Reduces potential pip resolver friction.
Verdict
No impact on functionality. Ready to merge once CI passes.
Greptile SummaryThis PR migrates all 15 IsaacLab sub-packages from
Confidence Score: 3/5The build-system migration is mechanically sound, but removing previously exported module-level constants from The source/isaaclab_assets/isaaclab_assets/init.py and source/isaaclab_assets/docs/README.md (removed public symbols, stale docs); source/isaaclab_rl/pyproject.toml (duplicate extras); tools/changelog/cli.py (dual version sources); source/isaaclab/pyproject.toml (missing isaaclab-ppisp in [all]). Important Files Changed
|
| rl-games = [ | ||
| "aiohttp==3.13.3", | ||
| "rl-games @ git+https://github.com/isaac-sim/rl_games.git@python3.11", | ||
| "gym", | ||
| "standard-distutils", | ||
| ] | ||
| rl_games = [ | ||
| "aiohttp==3.13.3", | ||
| "rl-games @ git+https://github.com/isaac-sim/rl_games.git@python3.11", | ||
| "gym", | ||
| "standard-distutils", | ||
| ] | ||
| rsl-rl = ["rsl-rl-lib==5.0.1", "onnxscript>=0.5"] | ||
| rsl_rl = ["rsl-rl-lib==5.0.1", "onnxscript>=0.5"] |
There was a problem hiding this comment.
Duplicate normalized extra names
Both rsl-rl / rsl_rl and rl-games / rl_games are defined as separate extras with identical content. Per PEP 685, extra names are normalized (underscores and hyphens collapse to hyphens), so these pairs refer to the same extra. Some pip/uv versions will raise an error or emit a warning when duplicate normalized extras are declared. The test in test_wheel_builder_metadata.py already works around this by iterating both names, which is a signal that this duplication is unintentional. Keeping only the hyphenated canonical forms (rsl-rl, rl-games) is sufficient.
| [project.optional-dependencies] | ||
| isaacsim = ["isaacsim[all,extscache]==5.1.0"] | ||
| all = [ | ||
| "isaacsim[all,extscache]==5.1.0", | ||
| "isaaclab_assets", | ||
| "isaaclab_contrib", | ||
| "isaaclab_experimental", | ||
| "isaaclab_mimic", | ||
| "isaaclab_newton[all]", | ||
| "isaaclab_ov", | ||
| "isaaclab_ovphysx", | ||
| "isaaclab_physx[newton]", | ||
| "isaaclab_rl[all]", | ||
| "isaaclab_tasks", | ||
| "isaaclab_tasks_experimental", | ||
| "isaaclab_teleop", | ||
| "isaaclab_visualizers[all]", | ||
| ] |
There was a problem hiding this comment.
isaaclab-ppisp absent from isaaclab[all]
isaaclab-ppisp was added to the root dev environment's dependencies (and [tool.uv.sources]) in this PR, but it is not listed in [project.optional-dependencies] all here. Users installing pip install isaaclab[all] will not receive isaaclab-ppisp, while uv sync from the repo root will. This inconsistency means the [all] extra no longer installs the full set of sub-packages.
| [project.scripts] | ||
| isaaclab = "isaaclab.cli:cli" | ||
| play = "isaaclab.cli:play" | ||
| train = "isaaclab.cli:train" |
There was a problem hiding this comment.
Would it be possible to use less generic names for these executables? In larger virtual environments, binaries like play and train could both confuse users and potentially clash with executables provided by other packages.
There was a problem hiding this comment.
We like the simple naming, what would be the alternative? isaaclab_train?
There was a problem hiding this comment.
Let's consider the extreme case where IsaacLab eventually becomes part of the official Ubuntu repositories as a python3-isaaclab deb package. In that scenario, users would end up with generic play and train executables in their PATH, which would be highly ambiguous and likely conflict-prone.
While this may sound hypothetical, it is already a practical concern in ecosystems such as conda-forge. Those environments can grow to the scale of a Linux distribution and may contain IsaacLab alongside other frameworks like mjlab and many additional ML/RL toolchains. Generic executable names do not scale well in such shared environments.
I would strongly recommend addressing this upstream rather than leaving it to downstream packagers. Otherwise, distributions will likely introduce their own ad-hoc renaming conventions, leading to fragmentation and inconsistent UX across ecosystems.
Two approaches seem reasonable here:
-
Rename the executables to something namespaced, e.g.:
isaaclab-playisaaclab-train
-
Introduce a single top-level
isaaclabCLI with subcommands:isaaclab train [...]isaaclab play [...]
Personally, I think option 2 is the cleanest long-term design, especially since implementing subcommands with argparse is straightforward and scales better as the CLI surface grows. However, even option 1 would already avoid the namespace collision problem.
Description
Migrates all IsaacLab packages from
setup.pytopyproject.tomlas the sole build system declaration, and introducesuvas the recommended package manager for development installs.What changed:
setup.pyfrom all 15 source packages (isaaclab,isaaclab_assets,isaaclab_contrib,isaaclab_experimental,isaaclab_mimic,isaaclab_newton,isaaclab_ov,isaaclab_ovphysx,isaaclab_physx,isaaclab_ppisp,isaaclab_rl,isaaclab_tasks,isaaclab_tasks_experimental,isaaclab_teleop,isaaclab_visualizers). All metadata (dependencies, extras, entry points, classifiers) is now declared exclusively in each package'spyproject.toml.pyproject.toml(isaaclab-dev) that wires all source packages together as editable path dependencies via[tool.uv.sources], enabling a singleuv syncto install the full development environment.isaaclab-ppispis included in both the default dependencies and the[all]extra so thatpip install isaaclab[all]anduv syncinstall the same set of packages.tomlimport insimulation_context.pyand its test with stdlibtomllib(available since Python 3.11), removing an undeclared dependency. Module-level constants (ISAACLAB_EXT_DIR,ISAACLAB_METADATA,ISAACLAB_ASSETS_EXT_DIR, etc.) are preserved and continue to read fromconfig/extension.tomlviatomllib.isaaclab_rlto their PEP 685 canonical hyphenated forms — the underscore aliasesrsl_rlandrl_gamesare removed. Migration: usepip install isaaclab-rl[rsl-rl]andpip install isaaclab-rl[rl-games]going forward.isaaclab_ovphysx/pyproject.tomldeclaringrequires-python = ">=3.11"— corrected to>=3.12to match the rest of the project.tools/changelog/cli.py:current_version()now raises immediately ifconfig/extension.tomlandpyproject.tomldisagree, preventing silent version drift from corrupting future changelog bumps.__init__.pyversion detection across packages — theimportlib.metadatalookup is now a clean try/except with a"0.0.0"fallback, removing boilerplate that was previously spread across every package.pytest,pytest-mock,junitparser,flatdict,flaky) out of baseinstall_requiresand into a newtestoptional extra (pip install isaaclab[test]). Therun-testsCI action now installs these unconditionally before invoking pytest, fixing theNo module named pytestfailure that occurred when running against the Isaac Sim bundled Python.isaacsimandallextras insource/isaaclab/pyproject.tomlpinningisaacsim==5.1.0— updated to>=6.0.0to match the version targeted byisaaclab.sh -iandinstall.py.install.pyCLI command and benchmark test utilities to match the new package naming conventions.Fixes # (issue)
Type of change
Breaking changes
isaaclab_rl[rsl_rl]andisaaclab_rl[rl_games]extras no longer exist. Useisaaclab_rl[rsl-rl]andisaaclab_rl[rl-games]respectively.Screenshots
N/A — build system change only.
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there