Repository navigation
[Backport release/3.0.0] Fix template generator in uv environments (#7480) - #7585
Conversation
The template generator attempted to install its dependencies with `python -m pip` every time it started. Fresh uv environments do not include the pip module, so the install failed and the generator then crashed while importing its prompt dependency. This change: - declares Jinja2 in the root dependency metadata so source and wheel installs provide the renderer - removes runtime dependency installation from `isaaclab --new` - replaces InquirerPy with the existing Rich dependency and native numbered multi-selection validation - removes the duplicate template requirements file - makes generated projects use the kit-less Newton backend by default instead of installing Isaac Sim - forwards `isaacsim`, `ov`, `ovphysx`, and `ovrtx` as optional extras in generated projects - documents backend selection in the generated README - adds prompt, launcher, generated-metadata, and wheel-metadata regression coverage No new prompt dependency is introduced: Jinja2 was already present transitively, while removing InquirerPy also removes its otherwise-unused `pfzy` dependency. - Bug fix (non-breaking change which fixes an issue) - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` Not applicable. - `uv run python -m pytest --confcutdir=tools/template tools/template/test_cli.py -q` (4 passed) - `uv run python -m pytest source/isaaclab/test/cli/test_misc_commands.py source/isaaclab/test/cli/test_wheel_builder_metadata.py -q` (18 passed) - verified the generated-metadata regression fails against the pre-fix template because `isaacsim` is a base dependency - `uv run python tools/changelog/cli.py check develop` - `uv run isaaclab -f` - generated an external direct single-agent project with RSL-RL in a clean uv environment without InquirerPy or pfzy, then compiled its generated Python and parsed both generated TOML files - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with `uv run isaaclab -f` - [x] I updated the generated project documentation - [x] My changes generate no new warnings - [x] I have added tests that prove the fix is effective - [x] I have added a changelog fragment for the touched `isaaclab` package - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Antoine Richard <[email protected]> (cherry picked from commit 7483997)
Greptile SummaryThis backport removes runtime pip installation from the template command, declares Jinja2 as an Isaac Lab dependency, replaces InquirerPy prompts with Rich, and substantially redesigns generated external projects around a single uv
Confidence Score: 4/5The PR should not merge until generated task and robot names are prevented from selecting importer-blacklisted packages that leave tasks unregistered. The new free-form task-family and robot naming permits valid-looking inputs such as Files Needing Attention: tools/template/generator.py, tools/template/templates/external/test_registration, docs/source/developer-tools/template_generator.rst Important Files Changed
Reviews (1): Last reviewed commit: "[Workflow] Fix template generator in uv ..." | Re-trigger Greptile |
| assert specification["task_name"].isidentifier(), "Task family name must be a valid identifier" | ||
| assert specification["robot_name"].isidentifier(), "Robot/config name must be a valid identifier" |
There was a problem hiding this comment.
Blacklisted names skip registration
External task-family and robot names are only checked with isidentifier(), so accepted names such as mdp or utils can be excluded by the generated task importer. For example, selecting mdp as the task-family name creates the package, but import_packages(__name__, ["utils", ".mdp"]) skips it. Its gym.register() call never runs, so the generated task cannot be found.
|
|
||
| import gymnasium as gym | ||
|
|
||
| import {{ name }}.tasks # noqa: F401 |
There was a problem hiding this comment.
Keywords break generated tests
The project name is rendered directly into an import statement, but the generator accepts Python keywords because str.isidentifier() returns true for names such as class. Such a project gets a syntactically invalid registration test, so the documented uv run pytest workflow fails during test collection. Reject keywords or import the generated package dynamically.
|
|
||
| .. code-block:: bash | ||
|
|
||
| uv run isaaclab random_agent --task <TASK_NAME> --num_envs 16 --viz newton |
There was a problem hiding this comment.
This first-run example, as well as the play example later in the page, recommends --viz newton. That value is only a deprecated alias and emits a warning; newton_gl is the canonical value. Teaching the canonical option avoids warnings and another documentation migration when the alias is removed.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the backport’s removal of runtime pip installation, declaration of Jinja2 in package metadata, Rich-based prompts, generated-project src layout, and consolidated documentation. No numbered candidate findings were supplied for acceptance.
- Design and architecture: The dependency path is coherent: the CLI now runs the generator directly, Jinja2 is present in root and wheel metadata, and the obsolete template requirements file is removed from CI use. The single-package src layout, task-discovery entry point, and opt-in UI extension are consistently represented across generation and documentation.
- API: The command_new delegation contract remains intact. Existing programmatic generator inputs retain defaults for task_name, robot_name, and include_ui_extension, while internal task IDs and filenames remain covered. The removed documentation pages’ public reference labels are preserved in the replacement page.
- Implementation: Traced generated family names, task IDs, environment filenames, entry points, registration tests, and list filtering through the generator and templates. Tests cover direct and manager-based layouts, wheel dependencies, prompt behavior, and passive package imports. Residual validation gaps remain for Python-keyword project names and a task family literally named mdp, but neither was presented as a numbered candidate finding.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
|
run-ci |
# Description LEAPP 0.7.0 introduced two regressions in the Isaac Lab export suite after it was published on September 4: - Kuka-Allegro export re-enters the graph with `robot_root_link_quat_w` after registering the aliased tensor as `robot_root_quat_w`. - SKRL Cartpole export fails while LEAPP reconstructs Warp `BuiltinCallDesc` tuple subclasses during `wp.rand_init` interception. The `isaaclab_rl` package-test job installed bare `leapp`, so the new release entered CI without a repository change. The same failures appeared in unrelated PRs, including #7585 and #7544. This change pins both the public `leapp` extra and the package-test installation to `leapp==0.6.1`. The lockfile now resolves the same version, keeping project environments and CI aligned until the LEAPP 0.7 regressions are fixed upstream. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `uv lock --check` passed. - `uv run --extra leapp python -c "..."` resolved and verified LEAPP 0.6.1. - Focused pre-commit YAML and TOML checks passed. - `uv run isaaclab -f` passed every formatting, syntax, metadata, and spelling hook except the changelog-fragment hook. That hook reports four pre-existing `develop`-base fragment problems in `isaaclab_newton`, `isaaclab_tasks`, `isaaclab_experimental`, and `isaaclab_visualizers`; this PR changes no `source/` path. - `git diff --check upstream/develop` passed. ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks; the unrelated base-branch changelog failure is documented above. - [x] Documentation changes are not required for this dependency pin. - [x] My changes generate no new warnings. - [x] No test was added; dependency resolution and repository metadata checks cover this pinning change. - [x] No changelog fragment is required because no release-managed package under `source/` changes. - [x] My name already exists in `CONTRIBUTORS.md`.
# Description LEAPP 0.7.0 introduced two regressions in the Isaac Lab export suite after it was published on September 4: - Kuka-Allegro export re-enters the graph with `robot_root_link_quat_w` after registering the aliased tensor as `robot_root_quat_w`. - SKRL Cartpole export fails while LEAPP reconstructs Warp `BuiltinCallDesc` tuple subclasses during `wp.rand_init` interception. The `isaaclab_rl` package-test job installed bare `leapp`, so the new release entered CI without a repository change. The same failures appeared in unrelated PRs, including #7585 and #7544. This change pins both the public `leapp` extra and the package-test installation to `leapp==0.6.1`. The lockfile now resolves the same version, keeping project environments and CI aligned until the LEAPP 0.7 regressions are fixed upstream. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable. ## Validation - `uv lock --check` passed. - `uv run --extra leapp python -c "..."` resolved and verified LEAPP 0.6.1. - Focused pre-commit YAML and TOML checks passed. - `uv run isaaclab -f` passed every formatting, syntax, metadata, and spelling hook except the changelog-fragment hook. That hook reports four pre-existing `develop`-base fragment problems in `isaaclab_newton`, `isaaclab_tasks`, `isaaclab_experimental`, and `isaaclab_visualizers`; this PR changes no `source/` path. - `git diff --check upstream/develop` passed. ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks; the unrelated base-branch changelog failure is documented above. - [x] Documentation changes are not required for this dependency pin. - [x] My changes generate no new warnings. - [x] No test was added; dependency resolution and repository metadata checks cover this pinning change. - [x] No changelog fragment is required because no release-managed package under `source/` changes. - [x] My name already exists in `CONTRIBUTORS.md`. (cherry picked from commit 995d96c)
Description
Backports #7480 to
release/3.0.0by cherry-picking merged commit74839972bd890051f09f9d9535f476d3e532dc27with-xprovenance.The automatic backport run encountered conflicts in the wheel-metadata regression test and
uv.lock, then stopped because the combined conflict context exceeded the resolver limit.This manual backport preserves the release branch's wheel-builder helpers and installed-wheel compatibility dispatcher while adding the template dependency regression coverage. The lockfile retains the release dependency graph and records only the new direct Jinja2 requirement instead of importing
develop's unrelated marker normalization.74839972bd890051f09f9d9535f476d3e532dc275c610f076e6e8ba251bd08275d1dbbc3f13535979d0b45f46d089854ee5e487e0931adce63276250Type of change
Release backport
Validation
uv lock --checkpassed with the release-specific lockfile resolution.uv run python -m pytest --confcutdir=tools/template tools/template/test_cli.py -q— 7 passed.uv run python -m pytest source/isaaclab/test/cli/test_misc_commands.py source/isaaclab/test/cli/test_wheel_builder_metadata.py -q— 18 passed.uv run python -m pytest source/isaaclab_rl/test/test_template_generator.py -q— 20 passed.uv run isaaclab -fpassed.uv run --isolated --extra test -- make -C docs current-docspassed without warnings.git diff --check upstream/release/3.0.0...HEADpassed.Checklist
CONTRIBUTORS.md.