Skip to content

docs(api): resolve Sphinx roles and hide private API members (NVBug 6628858) - #2564

Open
kheiss-uwzoo wants to merge 3 commits into
NVIDIA:mainfrom
kheiss-uwzoo:docs/6628858-api-reference-sphinx-roles
Open

docs(api): resolve Sphinx roles and hide private API members (NVBug 6628858)#2564
kheiss-uwzoo wants to merge 3 commits into
NVIDIA:mainfrom
kheiss-uwzoo:docs/6628858-api-reference-sphinx-roles

Conversation

@kheiss-uwzoo

Copy link
Copy Markdown
Collaborator

Summary

  • Stop publishing raw Sphinx :class: / :meth: markup on the API reference by converting roles at MkDocs build time.
  • Generate only the public ingest, retrieve, client, and parameter surfaces, and state the current 26.08 import paths.
  • Hide private members and duplicate re-exports (_buffers, __all__, repeated EmbedParams).

Fixes NVBug 6628858.

Test plan

  • Built the API page and confirmed Retriever / generate() / judge() show readable linked names instead of :class: text.
  • Confirmed EmbedParams appears once at nemo_retriever.common.params.EmbedParams.
  • Confirmed private headings (_buffers, _not_implemented, __all__) are absent.
  • Review the generated API page in the docs preview.

pre-draft: leakage, mkdocs --strict, ::a, ::p, ::r on the diff vs main

Base: upstream/main
Files: nemo-retriever-api-reference.md, mkdocs.yml, sphinx_roles.py

Check Result
Leakage (page roles + see [ CTAs) PASS for this change — no see [ on the API page; no nimOperator on faq.md, overview.md, or multimodal-extraction.md. Script also flagged untracked leftover custom-metadata.md, which is not in this diff.
Allowed paths PASS for the published page — 1 extraction markdown file. mkdocs.yml and sphinx_roles.py are docs-build files for this API-page fix.
mkdocs --strict FAIL — exit 1; 4 warnings on untracked leftover pages that are not in this diff. The API page is not among those warnings.
::a audit PASS — 7 import-path claims checked against src/ (95%). Code drift remains in retriever.py Sphinx roles.
::p polish Applied — converted import-path sentences into a lead-in plus a parallel list.
::r style 95% — no blocking issues

Code drift (not in this docs PR): nemo_retriever/src/nemo_retriever/graph/retriever.py:73 still documents nemo_retriever.params.EmbedParams; :645 still documents nemo_retriever.llm.clients.LiteLLMClient; :699 still documents nemo_retriever.llm.clients.judge.LLMJudge. The published page rewrites those roles at build time.

…628858)

The published API reference showed raw reST markup, stale import paths, and duplicate private symbols.
@kheiss-uwzoo
kheiss-uwzoo requested a review from jperez999 August 19, 2026 22:29
@kheiss-uwzoo kheiss-uwzoo self-assigned this Aug 19, 2026
@kheiss-uwzoo kheiss-uwzoo added 26.08 doc Improvements or additions to documentation labels Aug 19, 2026
Remove the Python Sphinx-role converter from the docs PR and hide generated docstrings that still contain unresolved reST roles.
@kheiss-uwzoo
kheiss-uwzoo marked this pull request as ready for review August 19, 2026 22:34
@kheiss-uwzoo
kheiss-uwzoo requested review from a team as code owners August 19, 2026 22:34
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR narrows the generated API reference to selected public NeMo Retriever surfaces and adjusts mkdocstrings defaults to hide private, inherited, and duplicate members.

  • Replaces broad module documentation directives with explicit ingest, retrieval, evaluation-client, and parameter directives.
  • Documents the supported public import paths and API usage.
  • Restricts mkdocstrings to the nemo_retriever source tree and public members.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/docs/extraction/nemo-retriever-api-reference.md Reorganizes the generated API section around explicit public objects and documented import paths.
docs/mkdocs.yml Configures mkdocstrings to use the NeMo Retriever source tree and suppress private, inherited, and submodule members.

Reviews (2): Last reviewed commit: "Merge branch 'main' into docs/6628858-ap..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

26.08 doc Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant