MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / _positions

Function _positions

scripts/docs/generate_rust_library_reference.py:606–618  ·  view source on GitHub ↗
(pages_by_html: dict[Path, Page], doc_root: Path)

Source from the content-addressed store, hash-verified

604
605
606def _positions(pages_by_html: dict[Path, Page], doc_root: Path) -> dict[Path, int]:
607 positions: dict[Path, int] = {}
608 for position, (_crate_name, crate_dir_name, _description) in enumerate(CRATES, start=1):
609 crate_index = (doc_root / crate_dir_name / "index.html").resolve()
610 positions[crate_index] = position
611
612 for html_path in pages_by_html:
613 if html_path.name != "index.html":
614 continue
615 for target, position in _item_order(html_path, pages_by_html).items():
616 positions[target] = position
617
618 return positions
619
620
621def _write_index(output_dir: Path) -> None:

Callers 1

generateFunction · 0.85

Calls 2

_item_orderFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected