Skip to content

Generate a relations reference page with autodoc - #1641

Merged
alexmillane merged 19 commits into
mainfrom
alex/docs/automatically_generated_api_docs
Nov 12, 2026
Merged

alexmillane merged 19 commits into
mainfrom
alex/docs/automatically_generated_api_docs

Conversation

@alexmillane

@alexmillane alexmillane commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Add a API reference page for the relations.

Why this change?

  • Currently there was no documentation page that detailed all the relations available to environment authors.

What changes?

  • Reference page
    • Adds autosummary table of the relations and their one-line summaries.
    • Below it, an "API reference" section has one autoclass entry per relation containing their docstring data.
  • relation_docs Sphinx extension (docs/_ext/relation_docs.py):
    • Adds each relation's YAML kind, read from ObjectRelationLibraryRegistry, below its summary line.
  • Relation docstrings (relations.py):
    • Complete docstrings.
  • Styling (custom.css): each autodoc class is shown in a bordered box with a tinted signature bar.

Validation

  • Built and viewed the new page.
image

Agents authoring environments assembled each relation's YAML kind,
parameters and validation behaviour by reading relations.rst, relations.py
and the graph types. Each relation docstring now states what it does, which
pre-physics check validates it (or that none does) and its restrictions,
in Google-style Validation and Restrictions sections.
relations_reference.py parses those docstrings with docstring-parser and
renders them with the __init__ signatures into
docs/pages/concepts/object_placement/relations_reference.rst: a summary
table plus, per relation, parameters with types, defaults and enum
options, and a YAML skeleton. A test fails when the page is out of date.

docstring-parser is declared in the dev extra; it was already installed
through cyclopts.

relations.rst and the author-environment skill link to the reference.

Signed-off-by: Alex Millane <amillane@nvidia.com>
@alexmillane
alexmillane force-pushed the alex/docs/automatically_generated_api_docs branch from 0fc3050 to c7c4385 Compare November 10, 2026 10:36
The relations reference page was generated by a custom script and
checked in, with a test to catch it going stale. It is now built by
Sphinx autodoc and napoleon from the relation docstrings during the
docs build, so nothing generated is committed.

docs/_ext/relation_docs.py adds each relation's YAML kind, aliases and
arity from the relation registry, and fails the build when a relation
lacks a Validation section, leaves a constructor parameter out of Args,
or is registered but not documented. Usage sections become Google-style
Example sections so they render as code.

The docs build now imports isaaclab_arena, so it runs in the Arena
container; docs/README.md describes the setup. The CI docs jobs still
need to move to the Arena image.

The generator, its test and the docstring-parser dependency are removed.
The author-environment skill points agents at the relation docstrings.

Signed-off-by: Alex Millane <amillane@nvidia.com>
Restore the relation docstrings from main and only add a one-line
Validation section to each, the missing Args of the position-limit
relations, and remove the Usage examples and the __init__ summaries that
repeat the class docstring. Drop the Restrictions sections.

Shorten the reference page introduction, describe what napoleon does in
conf.py, avoid the word arity in the YAML kind line, trim the Sphinx
extension, and revert the author-environment skill change.

Signed-off-by: Alex Millane <amillane@nvidia.com>
Signed-off-by: Alex Millane <amillane@nvidia.com>
autodoc imports isaaclab_arena, so the docs must build in the framework
environment. Move docs/requirements.txt into a docs extra, locked with
the framework's dependencies, and install it in the image so that
make html works in any Arena container.

Signed-off-by: Alex Millane <amillane@nvidia.com>
Add an autosummary table above the relation entries, box each class with a
tinted signature bar, and document PlaceableAsset so the parent type links
without a nitpick ignore. Tighten the relation summary lines.

Signed-off-by: Alex Millane <amillane@nvidia.com>
autodoc imports isaaclab_arena, so the pre-merge docs job and the gh-pages
deploy now run in the Arena image. The deploy follows a successful CI run on
main so that the latest image includes the docs extra. Each
sphinx-multiversion build imports its own checkout, and the relation coverage
check skips versions without a relations reference.

Signed-off-by: Alex Millane <amillane@nvidia.com>
Move the Sphinx dependencies from docs/requirements.txt into a docs extra that
the Arena image installs. The pre-merge docs job and the gh-pages deploy run
in the Arena image, and the deploy follows a successful CI run on main so the
latest image includes the docs extra.

Signed-off-by: Alex Millane <amillane@nvidia.com>
@alexmillane alexmillane changed the title Generate a relations reference page from the relation docstrings Generate a relations reference page with autodoc Nov 11, 2026
@alexmillane
alexmillane changed the base branch from main to alex/docs/build_in_arena_container November 11, 2026 09:14
@alexmillane
alexmillane added this pull request to stack #1656 November 11, 2026 09:18
Signed-off-by: Alex Millane <amillane@nvidia.com>
The deploy no longer waits for the whole CI workflow, so failing tests don't
block docs updates. The latest image can predate this commit's docs extra,
so the job installs it from the lock.

Signed-off-by: Alex Millane <amillane@nvidia.com>
Signed-off-by: Alex Millane <amillane@nvidia.com>
…relations.py

Add Restrictions sections to the relation docstrings and render them, with
Validation, below the parameters. Replace the per-relation list in
relations.rst with the reference page, and link ClutterOn settings to its
reference entry. The authoring skill now looks up relations in relations.py.

Signed-off-by: Alex Millane <amillane@nvidia.com>
@alexmillane
alexmillane marked this pull request as ready for review November 11, 2026 10:26
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes affect the documentation and its build, not relation placement at runtime.

Fix the simulator-dependent registry lookup before merging so the new page can build safely.

Findings

  1. P1 Docs load simulator too early ▶

Summary

Adds a relations reference page built from class and constructor docstrings.

  • The relations reference page lists each relation and its YAML options.

Reviews (1) · Last reviewed commit: "Merge branch 'alex/docs/build_in_arena_c..." · Reviewed by Greptile

Comment thread docs/_ext/relation_docs.py Resolved
Comment thread isaaclab_arena/relations/relations.py Resolved
Comment thread isaaclab_arena/relations/relations.py Resolved
Comment thread docs/_ext/relation_docs.py Resolved
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR adds a Relations Reference page built with autodoc. It has a summary table and one entry per relation. A small Sphinx extension (docs/_ext/relation_docs.py) adds each relation's YAML kind. It also emits a docs-build warning when a relation has no Validation: section, has an undocumented constructor argument, or is missing from the page. The page and extension fit the new in-container docs build well. I only have small accuracy and maintenance notes.

On Greptile's comment at docs/_ext/relation_docs.py:26: cli_runner.py --mode catalog already runs the same ensure_assets_registered() path without a simulator (print_catalog() → build_relation_catalogue()). So I don't expect it to crash the docs build. The real cost is that the docs build now imports every asset, embodiment, policy, and task module.

Findings

🔵 Improvement: isaaclab_arena/relations/relations.py:421: The Validation note for RequiresReachability doesn't say that ik_reachable only runs when the embodiment has a cuRobo config.
🔵 Improvement: isaaclab_arena/relations/relations.py:219: The changed first docstring lines also feed the environment-generation agent's RELATIONS prompt. Please confirm that change is intended and mention it in the PR description.
🔵 Improvement: docs/_ext/relation_docs.py:21: The deferred import is required, because Sphinx loads the extension before setup() in conf.py changes sys.path. A comment should say so.
🔵 Improvement: docs/pages/concepts/object_placement/relations_reference.rst:5: Link validation.rst so readers know what the named checks are.

Test Coverage and CI Cost

"Build the docs (pre-merge)" was skipped on this commit, and pre-commit is still queued. The -W build has not run in CI yet. That build turns the new warnings and any unresolved type references (for example PlaceableAsset) into errors. I couldn't build the docs here either. Rendering and a clean -W build have only been checked by the author's local build.

Verdict

Minor fixes needed

Signed-off-by: Alex Millane <amillane@nvidia.com>
@alexmillane alexmillane changed the title Generate a relations reference page with autodoc Add a relations API reference generated with autodoc Nov 11, 2026
@alexmillane alexmillane changed the title Add a relations API reference generated with autodoc Generate a relations reference page with autodoc Nov 11, 2026

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

LGTM!

Signed-off-by: Alex Millane <amillane@nvidia.com>
Base automatically changed from alex/docs/build_in_arena_container to main November 12, 2026 12:39
alexmillane added a commit that referenced this pull request Nov 12, 2026
Move the docs build inside the Arena container to support incoming
auto-generated docs.

## Why this change?

- Currently, one cannot `import isaaclab_arena` in the docs-building
context
- This means we can auto-generate docs code.
- A follow-up introduces API docs
([#1641](#1641)).

## What changes?

- **Dependencies:** the Sphinx packages move from
`docs/requirements.txt` to a `docs` extra in `pyproject.toml`.
- **Pre-merge docs job** (`ci.yml`): `build_docs_pre_merge` runs in this
run's Arena image.
- Docs-only PRs skip the image build, so their docs build in the latest
published `main` image.
- **Docs deploy** (`gh-pages.yml`): the deploy now runs in the Arena
`latest` image.
- This `latest` image likely comes from the last image so the job
therefore installs the `docs` extra from `uv.lock` before building.

## Validation

- Built the docs in a local Arena container that has the `docs` extra.

---------

Signed-off-by: Alex Millane <amillane@nvidia.com>
…ly_generated_api_docs

Signed-off-by: Alex Millane <amillane@nvidia.com>

# Conflicts:
#	.github/workflows/ci.yml
#	.github/workflows/gh-pages.yml
@alexmillane
alexmillane enabled stacked auto-merge (squash) November 12, 2026 13:53
@alexmillane
alexmillane merged commit 48628e3 into main Nov 12, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants