Skip to content

Adds per-branch cloning command to docs#5952

Merged
kellyguo11 merged 3 commits into
isaac-sim:mainfrom
kellyguo11:clone-branch-doc
Jun 4, 2026
Merged

Adds per-branch cloning command to docs#5952
kellyguo11 merged 3 commits into
isaac-sim:mainfrom
kellyguo11:clone-branch-doc

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Apply doc update that specifies the branch to be used for cloning commands to main.
We previously added this to develop, but it appears content is getting overwritten from other branches.

Type of change

  • Documentation update

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 updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 4, 2026

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Review: Adds per-branch cloning command to docs

Overall Assessment: ✅ Looks Good

This is a well-designed documentation improvement that replaces duplicated clone instructions across 3 pages with a single, maintainable Sphinx directive that dynamically generates version-aware clone commands.

What This PR Does

  • Introduces a new Sphinx extension (docs/_extensions/isaaclab_docs.py) with a custom .. isaaclab-clone-commands:: directive
  • The directive generates SSH/HTTPS clone tab-sets with --branch <version> automatically resolved from sphinx-multiversion or the ISAACLAB_LATEST_BRANCH env var
  • Replaces hardcoded clone blocks in 3 RST files, reducing duplication and ensuring branch consistency across versioned docs

Observations

  1. Good design choice: Using smv_current_version from sphinx-multiversion as the primary branch source means each versioned doc build will reference the correct branch without manual updates.

  2. cd IsaacLab addition: The new directive adds cd IsaacLab after the clone command, which is a helpful improvement for users following along — previously they had to figure this out themselves.

  3. rst_prolog substitution: The |isaaclab_latest_branch| substitution is defined in conf.py but not currently used in any RST file in this PR. This is presumably for future use or other docs pages — just flagging for awareness.

  4. Extension metadata: The extension correctly declares parallel_read_safe: True and parallel_write_safe: True, which is good for build performance.

  5. CI: Pre-commit checks pass. Doc build is still pending at time of review.

Minor Suggestion (Non-blocking)

The directive uses code-block:: bash while the previous inline code used code:: bash. This is fine (both work), and code-block is the more explicit/modern form — just noting the consistency improvement.

No issues found. Clean, well-scoped documentation improvement. 👍


Update (c7a808f): New commits fix Isaac ROS documentation URLs (isaac_manipulator_ur_dnn_policyisaac_ros_manipulation_ur_dnn_policy) and update the ThreeDWorld link to the active GitHub repo. Changes look correct — no new issues.


Update (9476d9a): Branch synced with main — brings in the merged rsl-rl checkpoint deprecation fix (PR #5953). No changes to the documentation files in this PR's scope. No new issues.

@greptile-apps

greptile-apps Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR centralises the Isaac Lab repository clone commands into a custom Sphinx extension (isaaclab_docs.py) so that the displayed --branch flag is always consistent with the version of the docs being viewed, rather than being duplicated static text that could diverge across branches.

  • A new IsaacLabCloneCommands directive resolves the correct branch via smv_current_version (when building with sphinx-multiversion) or the ISAACLAB_LATEST_BRANCH env var (plain sphinx-build), and emits a tab-set code block with the branch pinned accordingly.
  • Three RST files (deployment/index.rst, src_clone_isaaclab.rst, quickstart.rst) replace their duplicated inline tab-set clone blocks with a single .. isaaclab-clone-commands:: call.
  • conf.py is updated to register the extension and expose |isaaclab_latest_branch| as an rst_prolog substitution (currently unreferenced in any RST file in this diff).

Confidence Score: 4/5

Documentation-only change that is safe to merge; the new Sphinx extension is straightforward and the RST substitutions are mechanical.

The core logic is simple and correct. Two minor observations — an unused rst_prolog substitution and the quietly-added cd IsaacLab step — do not affect correctness but are worth a quick author check before merging.

docs/_extensions/isaaclab_docs.py and docs/conf.py are the only files that warrant a second look, specifically around the unused substitution and the newly added cd IsaacLab in the generated clone commands.

Important Files Changed

Filename Overview
docs/_extensions/isaaclab_docs.py New custom Sphinx extension that registers the isaaclab-clone-commands directive; injects a branch-pinned git clone tab-set using smv_current_version or a fallback config value
docs/conf.py Adds _extensions to sys.path, registers isaaclab_docs extension, reads ISAACLAB_LATEST_BRANCH env var, and exposes it as both a Sphinx config value and an rst_prolog substitution
docs/source/deployment/index.rst Replaces inline tab-set clone block with .. isaaclab-clone-commands:: directive; straightforward substitution
docs/source/setup/installation/include/src_clone_isaaclab.rst Replaces inline tab-set clone block with .. isaaclab-clone-commands:: directive; straightforward substitution
docs/source/setup/quickstart.rst Replaces inline tab-set clone block with .. isaaclab-clone-commands:: directive; straightforward substitution

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Sphinx build starts] --> B{sphinx-multiversion?}
    B -- Yes --> C[smv_current_version = branch/tag name]
    B -- No --> D[smv_current_version = empty string]
    C --> E["_branch() returns smv_current_version"]
    D --> F["_branch() reads isaaclab_latest_branch config"]
    F --> G{ISAACLAB_LATEST_BRANCH env var set?}
    G -- Yes --> H[Use env var value]
    G -- No --> I[Default to 'main']
    E --> J["IsaacLabCloneCommands.run() generates RST"]
    H --> J
    I --> J
    J --> K["tab-set with --branch injected into SSH & HTTPS code blocks"]
    K --> L[Rendered HTML docs]
Loading

Reviews (1): Last reviewed commit: "Adds per-branch cloning command to docs" | Re-trigger Greptile

Comment thread docs/conf.py
Comment on lines +49 to +51
rst_prolog = f"""
.. |isaaclab_latest_branch| replace:: {isaaclab_latest_branch}
"""

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 Unused rst_prolog substitution

The |isaaclab_latest_branch| substitution is defined here but none of the RST files changed in this PR (or the existing clone instruction files) appear to reference it. The actual branch injection is handled entirely by the IsaacLabCloneCommands Python directive. If this substitution is intended for future inline prose use across other RST files (e.g. "clone branch |isaaclab_latest_branch|"), that's fine — but it's worth confirming it won't go stale since it's sourced from the same ISAACLAB_LATEST_BRANCH env var and will silently render as the literal pipe-delimited string if referenced in a file that doesn't include the prolog.

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 +37 to +56
def run(self) -> list[nodes.Node]:
branch = _branch(self.config)
content = f"""\
.. tab-set::

.. tab-item:: SSH

.. code-block:: bash

git clone git@github.com:isaac-sim/IsaacLab.git --branch {branch}
cd IsaacLab

.. tab-item:: HTTPS

.. code-block:: bash

git clone https://github.com/isaac-sim/IsaacLab.git --branch {branch}
cd IsaacLab
"""
return _parse_rst(self, content)

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 cd IsaacLab is a new, undocumented behaviour change

The previous inline code:: blocks showed only the git clone command. This directive now appends cd IsaacLab to both SSH and HTTPS variants. In the deployment/container context (deployment/index.rst) the text that follows the clone block does not assume the working directory is IsaacLab, so readers may find the extra step confusing or superfluous there. If the intent is to always include cd IsaacLab, the PR description should mention it; if it is incidental, consider dropping the cd from the generated content.

@kellyguo11 kellyguo11 merged commit 4927517 into isaac-sim:main Jun 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant