[Workflow] Update extra paths configuration for all workflows - #6644
[Workflow] Update extra paths configuration for all workflows#6644StafaH wants to merge 7 commits into
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 |
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