Repository navigation
docs: fix swapped preserve_order descriptions in resolve_matching_names docstrings - #5546
Conversation
…es docstrings The docstrings for both resolve_matching_names and resolve_matching_names_values had the descriptions for preserve_order=True and preserve_order=False swapped. The actual code behavior and examples were correct, but the prose descriptions were inverted. Fixes isaac-sim#5146
Greptile SummaryThis PR fixes an inverted docstring in
Confidence Score: 5/5Safe to merge — only docstring text is changed; no logic, behaviour, or interface is modified. The change corrects two mirrored documentation errors. The actual implementation and all examples in the docstrings were already correct; only the prose descriptions for preserve_order=True and preserve_order=False were swapped. Reading the code confirms the fix is accurate for both functions. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[resolve_matching_names / resolve_matching_names_values called] --> B{preserve_order?}
B -- False default --> C[Return matches in target-string list order]
B -- True --> D[Reorder results to follow query-key order]
Reviews (1): Last reviewed commit: "docs: fix swapped preserve_order descrip..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Fixes incorrect docstring descriptions for the preserve_order parameter in resolve_matching_names and resolve_matching_names_values so the prose matches the functions’ actual ordering behavior.
Changes:
- Swapped the
preserve_order=Truevspreserve_order=Falsedescriptions inresolve_matching_namesdocstring. - Swapped the
preserve_order=Truevspreserve_order=Falsedescriptions inresolve_matching_names_valuesdocstring.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| If the :attr:`preserve_order` is False, the ordering of the matched indices and names is the same as the order | ||
| If the :attr:`preserve_order` is True, the ordering of the matched indices and names is the same as the order | ||
| of the provided list of query regular expressions. |
|
Friendly ping for review 🙏 This is a small, focused fix. CI is passing. Thank you! |
|
Hi! 👋 This PR has passed all CI checks and looks ready for review. Could a maintainer please take a look when they have a chance? Thank you! |
# Description Merge changes from main branch: - #4875 - Adds Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants - #4909 - Updates minor RSL-RL configclass docstring - #4934 - Updates Newton docs on main for 3.0 beta changes - #5182 - Fix flatdict version pin to allow 4.1.0+ - #5195 - Add NCCL troubleshooting notes - #5406 - Updates doc building job on main to match develop - #5311 - Update skrl integration for version 2.0.0 - #5482 - Adds nightly-changelog.yml on main - #5527 - Use isaaclab-bot GitHub App token for nightly changelog push - #5537 - Address deprecation warnings in nightly changelog workflow - #5746 - Fix .dockerignore for _isaac_sim symlink - #5745 - Parameterize nightly compile over configurable branches - #5546 - Fix swapped preserve_order docstrings - #5817 - Update skrl agent configurations in the Isaac Lab template
# Description Merge changes from main branch: - isaac-sim#4875 - Adds Isaac-Stack-Cube-Franka-IK-Rel-v0 task variants - isaac-sim#4909 - Updates minor RSL-RL configclass docstring - isaac-sim#4934 - Updates Newton docs on main for 3.0 beta changes - isaac-sim#5182 - Fix flatdict version pin to allow 4.1.0+ - isaac-sim#5195 - Add NCCL troubleshooting notes - isaac-sim#5406 - Updates doc building job on main to match develop - isaac-sim#5311 - Update skrl integration for version 2.0.0 - isaac-sim#5482 - Adds nightly-changelog.yml on main - isaac-sim#5527 - Use isaaclab-bot GitHub App token for nightly changelog push - isaac-sim#5537 - Address deprecation warnings in nightly changelog workflow - isaac-sim#5746 - Fix .dockerignore for _isaac_sim symlink - isaac-sim#5745 - Parameterize nightly compile over configurable branches - isaac-sim#5546 - Fix swapped preserve_order docstrings - isaac-sim#5817 - Update skrl agent configurations in the Isaac Lab template
…es docstrings (isaac-sim#5546) ## Description Fixes isaac-sim#5146 The docstrings for both `resolve_matching_names` and `resolve_matching_names_values` in `source/isaaclab/isaaclab/utils/string.py` had the descriptions for `preserve_order=True` and `preserve_order=False` swapped. **Current (incorrect) docstring:** - `preserve_order=True` → "ordering is dictated by the order of the target strings" - `preserve_order=False` → "ordering is the same as the order of the provided list of query regular expressions" **Actual code behavior (and examples):** - `preserve_order=False` → target list order (default, no reordering) - `preserve_order=True` → query keys order (reordering occurs inside `if preserve_order:`) The fix swaps the prose descriptions to match the actual code behavior and the provided examples. ## Type of change - [x] Documentation fix (non-breaking change which fixes a docstring) ## Checklist - [x] I have checked that there is no similar PR - [x] The code examples in the docstrings are correct and unchanged Co-authored-by: Cao Hanzhe <dashitongzhi@users.noreply.github.com>
## Description Clarify the established binary-action convention without changing behavior: - `True` and non-negative floating-point actions select the configured open command. - `False` and negative floating-point actions select the configured close command. - Rename the internal selection mask to `close_mask` so its meaning cannot be confused with the input action. - Apply the same clarification to both joint-based and surface-gripper binary actions, which share this contract. - Correct the documented zero boundary: zero opens because the close condition is strictly `< 0`. The runtime convention is intentionally preserved. Reversing the boolean mapping would break existing policies and downstream integrations that follow the documented `True`/positive = open contract. The earlier `resolve_matching_names` change is no longer part of this PR. Both affected string helpers were fixed comprehensively by #5546. Fixes #4670 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active `release/3.0.0` branch after it merges into `develop` This clarification applies to the same implementation on `release/3.0.0`; please backport it so the supported 3.0 documentation and source comments do not retain the ambiguous convention or incorrect zero boundary. ## Validation - Exercised both action terms with boolean and floating-point inputs, including `True`, `False`, positive, zero, and negative values. - `uv run isaaclab -f` - `uv run python tools/changelog/cli.py check develop` - `uv run --isolated --extra dev -- make -C docs current-docs` ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks. - [x] I have made corresponding changes to the documentation. - [x] My changes generate no new warnings. - [x] I have added a changelog fragment under `source/isaaclab/changelog.d/`. - [x] The contributor is listed in `CONTRIBUTORS.md`. --------- Signed-off-by: alltheseas <alltheseas@users.noreply.github.com> Co-authored-by: alltheseas <alltheseas@users.noreply.github.com> Co-authored-by: nv-caelan <cgarrett@nvidia.com> Co-authored-by: Clemens Schwarke <96480707+ClemensSchwarke@users.noreply.github.com> Co-authored-by: Kelly Guo <kellyg@nvidia.com> Co-authored-by: ooctipus <zhengyuz@nvidia.com> Co-authored-by: Mustafa Haiderbhai <mhaiderbhai@nvidia.com>
## Description Clarify the established binary-action convention without changing behavior: - `True` and non-negative floating-point actions select the configured open command. - `False` and negative floating-point actions select the configured close command. - Rename the internal selection mask to `close_mask` so its meaning cannot be confused with the input action. - Apply the same clarification to both joint-based and surface-gripper binary actions, which share this contract. - Correct the documented zero boundary: zero opens because the close condition is strictly `< 0`. The runtime convention is intentionally preserved. Reversing the boolean mapping would break existing policies and downstream integrations that follow the documented `True`/positive = open contract. The earlier `resolve_matching_names` change is no longer part of this PR. Both affected string helpers were fixed comprehensively by #5546. Fixes #4670 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active `release/3.0.0` branch after it merges into `develop` This clarification applies to the same implementation on `release/3.0.0`; please backport it so the supported 3.0 documentation and source comments do not retain the ambiguous convention or incorrect zero boundary. ## Validation - Exercised both action terms with boolean and floating-point inputs, including `True`, `False`, positive, zero, and negative values. - `uv run isaaclab -f` - `uv run python tools/changelog/cli.py check develop` - `uv run --isolated --extra dev -- make -C docs current-docs` ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks. - [x] I have made corresponding changes to the documentation. - [x] My changes generate no new warnings. - [x] I have added a changelog fragment under `source/isaaclab/changelog.d/`. - [x] The contributor is listed in `CONTRIBUTORS.md`. --------- Signed-off-by: alltheseas <alltheseas@users.noreply.github.com> Co-authored-by: alltheseas <alltheseas@users.noreply.github.com> Co-authored-by: nv-caelan <cgarrett@nvidia.com> Co-authored-by: Clemens Schwarke <96480707+ClemensSchwarke@users.noreply.github.com> Co-authored-by: Kelly Guo <kellyg@nvidia.com> Co-authored-by: ooctipus <zhengyuz@nvidia.com> Co-authored-by: Mustafa Haiderbhai <mhaiderbhai@nvidia.com> (cherry picked from commit 1fb0997)
Description
Fixes #5146
The docstrings for both
resolve_matching_namesandresolve_matching_names_valuesinsource/isaaclab/isaaclab/utils/string.pyhad the descriptions forpreserve_order=Trueandpreserve_order=Falseswapped.Current (incorrect) docstring:
preserve_order=True→ "ordering is dictated by the order of the target strings"preserve_order=False→ "ordering is the same as the order of the provided list of query regular expressions"Actual code behavior (and examples):
preserve_order=False→ target list order (default, no reordering)preserve_order=True→ query keys order (reordering occurs insideif preserve_order:)The fix swaps the prose descriptions to match the actual code behavior and the provided examples.
Type of change
Checklist