Skip to content

[Workflow] Update extra paths configuration for all workflows - #6644

Merged
StafaH merged 11 commits into
isaac-sim:developfrom
StafaH:mh/extrapaths_fix
Sep 8, 2026
Merged

StafaH merged 11 commits into
isaac-sim:developfrom
StafaH:mh/extrapaths_fix

Conversation

@StafaH

@StafaH StafaH commented Jul 21, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • Checked-in Pyright policy lives in pyproject.toml.
  • Machine-specific paths are written to a git-ignored pyrightconfig.json that extends the project policy.
  • VS Code settings retain interpreter and editor behavior without defining a competing python.analysis.extraPaths value.

The shared isaaclab.utils.editor utility discovers:

  • Isaac Sim extension paths from the selected installation.
  • Isaac Lab monorepo packages under source/*.
  • Standard downstream packages under a src layout.
  • Isaac Lab packages visible to the active interpreter, covering editable and wheel installs.

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 uv src layout introduced on develop. Invalid explicit --isaac_path values now fail clearly rather than silently selecting another installation.

No new runtime dependency is required.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Screenshots

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 passed
  • uv run pytest --confcutdir=tools/template tools/template/test_cli.py -q — 7 passed
  • uv run pytest source/isaaclab/test/cli/test_wheel_builder_metadata.py -q — 11 passed
  • Pyright 1.1.411 configuration check — 0 errors and 0 warnings
  • uv run isaaclab -f — passed, including changelog validation against the current upstream develop
  • uv run --isolated --extra dev -- make -C docs current-docs — warning-free build passed

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab -f
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • My name already exists in CONTRIBUTORS.md

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves editor search paths into shared Pyright configuration. The main changes are:

  • Adds in-repository package roots to the root Pyright settings.
  • Generates pyrightconfig.json for external projects.
  • Adds Isaac Sim path discovery and generated-file ignore rules.
  • Updates VS Code and Cursor setup documentation.

Confidence Score: 4/5

The generated editor setup can hide real import errors and accept an invalid Isaac Sim path.

  • The generated root configuration disables unresolved-import diagnostics for the whole project.
  • An invalid prompted path can silently select another installation or omit Kit paths.
  • The source-path and ignore-rule changes otherwise match the generated project layout.

tools/template/templates/external/.vscode/tools/setup_vscode.py

Important Files Changed

Filename Overview
tools/template/templates/external/.vscode/tools/setup_vscode.py Generates shared Pyright settings, but hides unresolved imports and silently ignores an invalid explicit Isaac Sim path.
tools/template/generator.py Adds the generated root Pyright configuration to external projects' ignore rules.
pyproject.toml Adds all current in-repository source package roots to Pyright.
tools/template/templates/external/.vscode/tools/settings.template.json Removes the Pylance-only extraPaths setting in favor of root Pyright configuration.
tools/template/templates/external/README.md Documents external-project setup for Pylance and basedpyright.
docs/source/overview/developer-guide/vs_code.rst Documents in-repository Pyright paths and Cursor support.

Reviews (1): Last reviewed commit: "Fix extraPaths" | Re-trigger Greptile

Comment on lines +125 to +127
"typeCheckingMode": "basic",
"reportMissingImports": "none",
"reportMissingModuleSource": "none",

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.

P1 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.

Suggested change
"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!

Comment on lines +48 to +49
if isaac_path and os.path.exists(isaac_path):
return isaac_path

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.

P1 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.

Suggested change
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}")

@AntoineRichard

AntoineRichard commented Jul 21, 2026 •

Copy link
Copy Markdown
Collaborator

[P2] Update the troubleshooting instructions

The generated README troubleshooting section still tells users to add or remove python.analysis.extraPaths in .vscode/settings.json. This PR removes that setting and places the paths in pyrightconfig.json, so those troubleshooting steps no longer affect the configured paths.

Easy fix:

  • Replace .vscode/settings.json with the root pyrightconfig.json.
  • Replace the python.analysis.extraPaths key with extraPaths.
  • In the crash section, tell users to remove unneeded entries from the extraPaths array rather than comment them out.

For example: “If an extension is missing, add its source directory to extraPaths in the root pyrightconfig.json. To reduce indexing, remove unused Isaac Sim extension directories from that same array.”

@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.

Thanks! Let's get this in. Cursor is annoying ATM, left a couple comments.

@AntoineRichard

Copy link
Copy Markdown
Collaborator

[P2] Preserve the existing Pyright configuration when generating the local config

pyrightconfig.json and [tool.pyright] are not merged. When both exist, Pyright gives pyrightconfig.json precedence and ignores the [tool.pyright] section entirely (Pyright documentation).

The template generator first copies the root pyproject.toml into the external project. Before running setup_python_env, that complete configuration controls the analysis scope, exclusions, Python version/platform, and diagnostic overrides. After write_pyright_config() creates pyrightconfig.json, only the four generated keys apply; the remaining checked-in settings are silently dropped. Running an IDE setup task therefore changes more than just the import search paths.

We do still need to replace extraPaths, because the copied paths are repository-specific and the generated project needs its own source and Isaac Sim paths. A small way to preserve the rest of the checked-in policy is to inherit it and override only that key:

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?

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 4, 2026
@StafaH StafaH changed the title Fix extraPaths [Workflow] Update extra paths configuration for all workflows Sep 4, 2026
@StafaH

StafaH commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026
@StafaH

StafaH commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 8, 2026
@StafaH

StafaH commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 8, 2026
@StafaH StafaH added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 8, 2026
@StafaH
StafaH merged commit c91b036 into isaac-sim:develop Sep 8, 2026
53 checks passed
kellyguo11 pushed a commit that referenced this pull request Sep 8, 2026
…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`.
@StafaH
StafaH deleted the mh/extrapaths_fix branch September 13, 2026 12:10
StafaH added a commit that referenced this pull request Sep 22, 2026
# 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`.
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 22, 2026
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:run-docker Trigger the on-demand Docker and GPU CI workflow documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants