Skip to content

[Core] Refactor and cleanup core subpackage for 3.0 [2/N] - #7959

Merged
StafaH merged 5 commits into
isaac-sim:developfrom
StafaH:core-cleanup/02-comments
Sep 23, 2026
Merged

StafaH merged 5 commits into
isaac-sim:developfrom
StafaH:core-cleanup/02-comments

Conversation

@StafaH

@StafaH StafaH commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Second PR in a series that splits the core cleanup in #7949 into small, reviewable pieces. This PR contains only comment and style changes in source/isaaclab/isaaclab; there is no logic change.

  • Comments that restate the next line of code are removed (e.g. # get stage handle, # import logger, # return the prim), along with commented-out code.
  • Comments are kept when they explain intent or ordering constraints, units (e.g. N-m/rad --> N-m/deg), deprecation plans, tensor shapes and formulas, non-obvious semantics (e.g. the same random value per body), the FactoryBase dispatch, TODO/FIXME items, and section markers in long functions.
  • The # extract the used quantities (to enable type-hinting) boilerplate is removed from the core package; the typed local variable already states its purpose.
  • Blank lines inside function bodies that ruff format does not require are removed.
  • Empty dict() / list() calls are replaced with {} / [].
  • A duplicated license header in utils/warp/fabric.py is removed.

This PR only deletes comments. Comments that the reference branch rewrites alongside code changes will ship in the PRs that change that code.

Verification:

  • Every file's AST (including docstrings) is identical to develop apart from the dict()/list() literals (520 files).
  • Importing every module under isaaclab gives the same result as on develop.
  • ruff check / ruff format are clean.

Type of change

  • Code cleanup (non-breaking, no functional change)

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

Checklist

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

@StafaH
StafaH requested a review from a team September 22, 2026 23:03
@github-actions github-actions Bot added isaac-mimic Related to Isaac Mimic team isaac-lab Related to Isaac Lab team labels Sep 22, 2026
@greptile-apps

greptile-apps Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with one non-blocking documentation concern around preserving the rationale for deprecated tendon compatibility paths.

Findings

  1. P2 Compatibility Rationale Was Removed ▶

Summary

This PR performs a broad, behavior-neutral cleanup of the Isaac Lab core package:

  • Removes comments that generally restate adjacent code and unnecessary blank lines.
  • Replaces empty dict() and list() calls with equivalent literals.
  • Removes a duplicated license header from the Fabric utility.
  • One pair of removed comments should be retained as compatibility documentation for deprecated tendon schema writers.

Reviews (1) · Last reviewed commit: "Remove restating comments and use empty ..."

.. deprecated:: 3.1
Use :func:`apply_fixed_tendon_properties` with schema fragments instead. This function will be removed
in 3.2.
"""

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.

P2 Compatibility rationale was removed

These comments were the only documentation that the deprecated fixed- and spatial-tendon writers intentionally support callers that pass Physx*TendonPropertiesCfg directly. The remaining deprecation notices identify the replacement API and removal version, but not this compatibility contract. Please preserve that rationale in the docstrings so maintainers do not accidentally remove the legacy path or convert it to fragment-only semantics before 3.2. The same concern applies to the spatial-tendon writer near line 1858.

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!

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

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.

Isaac Lab Review Bot

Reviewed the 115-file core cleanup covering comment and blank-line removal, empty container literal substitutions, and duplicate license-header deletion. The patch preserves executable behavior and includes the expected .skip changelog fragment.

  • Design and architecture: Backend factory delegation, manager and scene initialization ordering, and environment lifecycle paths remain structurally unchanged. The patch removes explanatory text but does not alter ownership, dispatch, or control-flow boundaries.
  • API: No public symbols, signatures, exports, or documented defaults change. Replacing zero-argument dict() and list() calls with {} and [] preserves runtime types and existing mutable-default semantics, including in @configclass fields and ClassVar state.
  • Implementation: The large cleanup hunks in schema handling, MDP events, manager execution, launcher setup, and scene construction retain their statements, indentation, and ordering. The duplicate SPDX block is removed while the canonical file header remains. A non-blocking tradeoff is that removing blank lines in some docstrings and rationale comments slightly reduces visual separation and contextual guidance, but no concrete behavior or documentation integration failure is established.

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.

@StafaH

StafaH commented Sep 23, 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 23, 2026
@StafaH
StafaH merged commit 160d508 into isaac-sim:develop Sep 23, 2026
53 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as 7693bc4.

isaaclab-bot Bot pushed a commit that referenced this pull request Sep 23, 2026
# Description

Second PR in a series that splits the core cleanup in #7949 into small,
reviewable pieces. This PR contains only comment and style changes in
`source/isaaclab/isaaclab`; there is no logic change.

- Comments that restate the next line of code are removed (e.g. `# get
stage handle`, `# import logger`, `# return the prim`), along with
commented-out code.
- Comments are kept when they explain intent or ordering constraints,
units (e.g. `N-m/rad --> N-m/deg`), deprecation plans, tensor shapes and
formulas, non-obvious semantics (e.g. the same random value per body),
the `FactoryBase` dispatch, TODO/FIXME items, and section markers in
long functions.
- The `# extract the used quantities (to enable type-hinting)`
boilerplate is removed from the core package; the typed local variable
already states its purpose.
- Blank lines inside function bodies that `ruff format` does not require
are removed.
- Empty `dict()` / `list()` calls are replaced with `{}` / `[]`.
- A duplicated license header in `utils/warp/fabric.py` is removed.

This PR only deletes comments. Comments that the reference branch
rewrites alongside code changes will ship in the PRs that change that
code.

Verification:
- Every file's AST (including docstrings) is identical to `develop`
apart from the `dict()`/`list()` literals (520 files).
- Importing every module under `isaaclab` gives the same result as on
`develop`.
- `ruff check` / `ruff format` are clean.

## Type of change

- Code cleanup (non-breaking, no functional change)


- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package (`.skip`)
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

(cherry picked from commit 160d508)
@StafaH
StafaH deleted the core-cleanup/02-comments branch October 10, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants