Repository navigation
[Workflow] Update extra paths configuration for all workflows - #6644
Conversation
Greptile SummaryThis PR moves editor search paths into shared Pyright configuration. The main changes are:
Confidence Score: 4/5The generated editor setup can hide real import errors and accept an invalid Isaac Sim path.
tools/template/templates/external/.vscode/tools/setup_vscode.py Important Files Changed
Reviews (1): Last reviewed commit: "Fix extraPaths" | Re-trigger Greptile |
| "typeCheckingMode": "basic", | ||
| "reportMissingImports": "none", | ||
| "reportMissingModuleSource": "none", |
There was a problem hiding this comment.
Missing Imports Become Invisible
After setup_python_env writes this root configuration, Pylance and basedpyright stop reporting every unresolved import, including misspelled project imports and missing dependencies. The generated search paths should resolve the intended Kit modules without globally disabling these diagnostics.
| "typeCheckingMode": "basic", | |
| "reportMissingImports": "none", | |
| "reportMissingModuleSource": "none", | |
| "typeCheckingMode": "basic", |
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!
| if isaac_path and os.path.exists(isaac_path): | ||
| return isaac_path |
There was a problem hiding this comment.
Invalid Explicit Path Is Ignored
When the VS Code task supplies a nonexistent --isaac_path, this branch silently ignores the prompted value and probes another installation or _isaac_sim. A typo can therefore generate paths for the wrong installation, or omit Kit paths entirely, instead of reporting that the required input is invalid.
| if isaac_path and os.path.exists(isaac_path): | |
| return isaac_path | |
| if isaac_path: | |
| if os.path.exists(isaac_path): | |
| return isaac_path | |
| raise ValueError(f"Isaac Sim path does not exist: {isaac_path}") |
|
[P2] Update the troubleshooting instructions The generated README troubleshooting section still tells users to add or remove Easy fix:
For example: “If an extension is missing, add its source directory to |
|
[P2] Preserve the existing Pyright configuration when generating the local config
The template generator first copies the root We do still need to replace config = {
"extends": "./pyproject.toml",
"extraPaths": extra_paths,
}Pyright supports extending JSON or TOML configurations, and keys in the child configuration override the base. If dropping the other settings is intentional for external projects, could we instead document that policy and add a test for the resulting configuration? |
|
run-ci |
|
run-ci |
|
run-ci |
|
run-ci |
…kflows (#6644) (#7655) # Description Backports #6644 to `release/3.0.0` by cherry-picking merged commit `c91b03687f4f4c753553b6d3617a75d988b973e5` with `-x` provenance. The [automatic backport run](https://github.com/isaac-sim/IsaacLab/actions/runs/34272587024) encountered conflicts in the installed-workflow regression test and aggregate-wheel entry point, then failed while resolving those conflicts. This manual backport preserves the release branch's installed-workflow test structure. The aggregate wheel stores the installed `isaaclab.__main__` shim at `tools/wheel_builder/res/__main__.py`, so the source change to `source/isaaclab/isaaclab/__main__.py` is applied at that release-specific path. The resulting file is byte-for-byte identical to the source PR result. Fixes #6475. | Field | Commit | |---|---| | Original merged change | `c91b03687f4f4c753553b6d3617a75d988b973e5` | | Release base used | `190888dbbec9d783a0032e2894af6566f0d690df` | | Proposed backport | `928cf344f54220a344ce46aba01188e79c6628cd` | ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Release backport - [ ] <!-- backport-active-release --> This PR already targets the active release branch; do not backport it again. ## Validation - Source/backport path audit preserved all original paths, with only the aggregate-wheel `__main__.py` relocation described above; the mapped source and backport blobs are identical. - `uv lock --check` passed. - `uv run --frozen --extra test python -m pytest source/isaaclab/test/cli/test_install_command_parsing.py source/isaaclab/test/cli/test_installed_workflow_entrypoints.py source/isaaclab/test/cli/test_wheel_builder_metadata.py -q` — 78 passed. - `uv run --frozen --extra test python -m pytest source/isaaclab_rl/test/test_template_generator.py -q` — 24 passed. - `uv run --frozen --extra test python -m pytest --confcutdir=tools/template tools/template/test_cli.py -q` — 7 passed. - `isaaclab --editor` smoke passed in a clean temporary workspace; an invalid explicit `--isaac_path` exited with status 2. - `uv run --frozen isaaclab -f` passed. - `uv run --frozen --extra test -- make -C docs current-docs` passed without warnings. - `git diff --check upstream/release/3.0.0...HEAD` passed. ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks. - [x] I have preserved the corresponding documentation changes. - [x] My changes generate no new warnings. - [x] I have preserved and run the focused regression tests. - [x] The original changelog fragments are preserved for both touched packages. - [x] The original contributor already exists in `CONTRIBUTORS.md`.
# Description Clean up the VS Code configuration for the Isaac Lab checkout and generated external projects, and fix the open VS Code debugging and settings-generation bugs. **Recommendations and settings** - Keep the Python and Pylance extensions and recommend the Ruff extension used by the current formatter and linter configuration. - Remove the unused C/C++, ROS, MyST, spelling, Black, and Flake8 recommendations. This also retires the archived `ms-iot.vscode-ros` recommendation that #4402 proposed to replace. - Remove the corresponding dead `.tpp`, Spell Right/cSpell, autoDocstring, and ROS Noetic settings from both settings templates. - Remove the deprecated Black, Flake8, and Jedi settings from the fallback settings written by `isaaclab --editor`. **Debugging (#2238)** - Since Python extension 2024.18.0, VS Code resolves `python.defaultInterpreterPath` wrapper scripts such as `_isaac_sim/python.sh` to the underlying executable, so launch configurations skip Isaac Sim's environment setup. Every launch configuration in both templates now sets `"python": "${config:python.defaultInterpreterPath}"`, the interpreter recorded by `isaaclab --editor`. - Update the repository launch template: use the `debugpy` type instead of the deprecated `python` type, use `connect` for the attach configuration, run training and playback through `isaaclab train`/`play` (the old `scripts/reinforcement_learning/rsl_rl/*.py` paths no longer exist), use the current `Isaac-Reach-Franka` task ID, and document `uv run python -m debugpy` for attach. - Document how to update an existing preserved `launch.json`. **Settings generation (#3965)** - #6644 already moved import paths to `pyrightconfig.json` via `json.dumps`. This PR also JSON-encodes the interpreter path in `.vscode/settings.json` and passes it to `re.sub` without escape processing. Before this change, an interpreter path containing a backslash crashed with `re.error: bad escape \U`. #6757 targets `tools/wheel_builder/res/__main__.py`, which no longer exists. **Tasks** - Replace the deprecated `isaaclab.sh --format` / `isaaclab.bat --format` task with `uv run isaaclab --format`. Fixes #2238 Fixes #3965 Supersedes #4402 and #6757. ## 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 run python -m pytest source/isaaclab_rl/test/test_template_generator.py` (28 passed). The editor setup test now also runs with a backslash interpreter path and parses the generated settings as JSON; this case fails without the fix. - `uv run isaaclab -f` (all hooks passed, including the changelog fragment check against upstream `develop`) ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the complete pre-commit checks. - [x] I have updated the editor setup documentation. - [x] My changes generate no new warnings. - [x] I have extended the closest editor setup test. - [x] I have added a changelog fragment for `isaaclab` and a `.skip` fragment for the `isaaclab_rl` test change. - [x] My name already exists in `CONTRIBUTORS.md`.
# Description Clean up the VS Code configuration for the Isaac Lab checkout and generated external projects, and fix the open VS Code debugging and settings-generation bugs. **Recommendations and settings** - Keep the Python and Pylance extensions and recommend the Ruff extension used by the current formatter and linter configuration. - Remove the unused C/C++, ROS, MyST, spelling, Black, and Flake8 recommendations. This also retires the archived `ms-iot.vscode-ros` recommendation that #4402 proposed to replace. - Remove the corresponding dead `.tpp`, Spell Right/cSpell, autoDocstring, and ROS Noetic settings from both settings templates. - Remove the deprecated Black, Flake8, and Jedi settings from the fallback settings written by `isaaclab --editor`. **Debugging (#2238)** - Since Python extension 2024.18.0, VS Code resolves `python.defaultInterpreterPath` wrapper scripts such as `_isaac_sim/python.sh` to the underlying executable, so launch configurations skip Isaac Sim's environment setup. Every launch configuration in both templates now sets `"python": "${config:python.defaultInterpreterPath}"`, the interpreter recorded by `isaaclab --editor`. - Update the repository launch template: use the `debugpy` type instead of the deprecated `python` type, use `connect` for the attach configuration, run training and playback through `isaaclab train`/`play` (the old `scripts/reinforcement_learning/rsl_rl/*.py` paths no longer exist), use the current `Isaac-Reach-Franka` task ID, and document `uv run python -m debugpy` for attach. - Document how to update an existing preserved `launch.json`. **Settings generation (#3965)** - #6644 already moved import paths to `pyrightconfig.json` via `json.dumps`. This PR also JSON-encodes the interpreter path in `.vscode/settings.json` and passes it to `re.sub` without escape processing. Before this change, an interpreter path containing a backslash crashed with `re.error: bad escape \U`. #6757 targets `tools/wheel_builder/res/__main__.py`, which no longer exists. **Tasks** - Replace the deprecated `isaaclab.sh --format` / `isaaclab.bat --format` task with `uv run isaaclab --format`. Fixes #2238 Fixes #3965 Supersedes #4402 and #6757. ## 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 run python -m pytest source/isaaclab_rl/test/test_template_generator.py` (28 passed). The editor setup test now also runs with a backslash interpreter path and parses the generated settings as JSON; this case fails without the fix. - `uv run isaaclab -f` (all hooks passed, including the changelog fragment check against upstream `develop`) ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the complete pre-commit checks. - [x] I have updated the editor setup documentation. - [x] My changes generate no new warnings. - [x] I have extended the closest editor setup test. - [x] I have added a changelog fragment for `isaaclab` and a `.skip` fragment for the `isaaclab_rl` test change. - [x] My name already exists in `CONTRIBUTORS.md`. (cherry picked from commit 00ecf5a)
Description
Fixes #6475.
This change makes Python import-path configuration consistent across Isaac Lab source checkouts, installed packages, and generated external projects, including both VS Code/Pylance and Cursor/basedpyright.
The configuration is split by ownership:
pyproject.toml.pyrightconfig.jsonthat extends the project policy.python.analysis.extraPathsvalue.The shared
isaaclab.utils.editorutility discovers:source/*.srclayout.The repository setup script and installed-package workflow now use that shared utility. The template generator copies the canonical setup wrapper instead of maintaining a second implementation, and the generated
pyproject.toml, README, tests, and documentation are aligned with the new single-package uvsrclayout introduced ondevelop. Invalid explicit--isaac_pathvalues now fail clearly rather than silently selecting another installation.No new runtime dependency is required.
Type of change
Release backport
developScreenshots
Not applicable.
Validation
uv run pytest source/isaaclab_rl/test/test_template_generator.py source/isaaclab/test/cli/test_installed_workflow_entrypoints.py -q— 34 passeduv run pytest --confcutdir=tools/template tools/template/test_cli.py -q— 7 passeduv run pytest source/isaaclab/test/cli/test_wheel_builder_metadata.py -q— 11 passeduv run isaaclab -f— passed, including changelog validation against the current upstreamdevelopuv run --isolated --extra dev -- make -C docs current-docs— warning-free build passedChecklist
uv run isaaclab -fsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md