Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 1 addition & 30 deletions docs/docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,43 +343,14 @@
{
"group": "telemetry",
"pages": [
"api/mellea/telemetry/context",
"api/mellea/telemetry/logging",
"api/mellea/telemetry/metrics",
"api/mellea/telemetry/telemetry",
"api/mellea/telemetry/tracing"
]
}
]
},
{
"group": "cli",
"pages": [
"api/cli/m",
{
"group": "alora",
"pages": [
"api/cli/alora/commands",
"api/cli/alora/intrinsic_uploader",
"api/cli/alora/readme_generator",
"api/cli/alora/train",
"api/cli/alora/upload"
]
},
{
"group": "decompose",
"pages": [
"api/cli/decompose/decompose"
]
},
{
"group": "eval",
"pages": [
"api/cli/eval/commands",
"api/cli/eval/eval",
"api/cli/eval/runner"
]
}
]
}
]
}
Expand Down
8 changes: 1 addition & 7 deletions tooling/docs-autogen/generate-ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ def generate_landing_page(
inferred from the representative MDX file body.
"""
mellea_entries = _collect_module_entries(api_dir, "mellea", docstring_cache)
cli_entries = _collect_module_entries(api_dir, "cli", docstring_cache)

def _entry(name: str, desc: str, preamble: str, href: str, pkg: str) -> str:
title = f"mellea.{name}" if pkg == "mellea" else f"m {name}"
Expand Down Expand Up @@ -758,29 +757,24 @@ def _list_section(entries: list[tuple[str, str, str, str]], pkg: str) -> str:
"""
content += _list_section(mellea_entries, "mellea")
content += "\n## CLI (`m`)\n\n"
content += _list_section(cli_entries, "cli")
content += "See the [CLI Reference](/reference/cli) page.\n"

out_path = docs_root / "api-reference.mdx"
safe_write_text(out_path, content)
print(f"✅ Generated landing page: {out_path}", flush=True)


def build_api_reference_tab_object(api_dir: Path, docs_root: Path) -> dict[str, Any]:
cli_pages = collect_pages_under(api_dir, "cli", docs_root)
mellea_pages = collect_pages_under(api_dir, "mellea", docs_root)

cli_tree = build_tree_from_paths(cli_pages)
mellea_tree = build_tree_from_paths(mellea_pages)

cli_nav = tree_to_mintlify(cli_tree, "cli")
mellea_nav = tree_to_mintlify(mellea_tree, "mellea")

return {
"tab": NAV_TAB,
"pages": [
"api-reference", # landing page, generated by generate_landing_page()
{"group": "mellea", "pages": mellea_nav["pages"]},
{"group": "cli", "pages": cli_nav["pages"]},
],
}

Expand Down
Loading