mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Finish the fumadocs→Hanzo Docs rebrand: rename the remaining fuma-named
workspace packages and every reference so the framework is uniformly
@hanzo/docs-*. One brand, no Fuma in package names or product surface.
Package renames (name field + all refs: deps, imports, CSS @import,
configs, .changeset, next/vite build config):
fumadocs-core → @hanzo/docs-core
fumadocs-mdx → @hanzo/docs-mdx
fumadocs-ui → @hanzo/docs-ui (packages/radix-ui)
fumadocs-openapi → @hanzo/docs-openapi
fumadocs-preview → @hanzo/docs-preview
@fumadocs/base-ui → @hanzo/docs-base-ui
@fumadocs/basehub → @hanzo/docs-basehub
@fumadocs/language → @hanzo/docs-language
@fumadocs/local-md → @hanzo/docs-local-md
@fumadocs/sanity → @hanzo/docs-sanity
@fumadocs/shadcn → @hanzo/docs-shadcn
@fumadocs/vite → @hanzo/docs-vite
@fumari/stf → @hanzo/docs-stf
create-fumadocs-app → @hanzo/create-docs
create-fumadocs-versions → @hanzo/docs-create-versions
Stale @fumadocs/{cli,story,tailwind,mdx-remote,...} references collapsed to
their existing @hanzo/docs-* canonical packages (no dup created).
De-branded product strings: Fumadocs/Fuma prose → Hanzo Docs/Hanzo; site
branding, CLI output, doc copy, AI-assistant name, metadata. URLs
fumadocs.dev → docs.hanzo.ai, repo fuma-nama/fumadocs → hanzoai/docs.
Filesystem renames: packages/python/fumapy → hanzodocs_py, preview config,
what-is-fumadocs.mdx → what-is-hanzo-docs.mdx, api/fumadocs-ui route.
KEPT (real external npm deps / attribution — NOT renamed):
fuma-cli, fuma-content, @fumari/json-schema-ts (published upstream pkgs),
typesense-/trieve-fumadocs-adapter (3rd-party search adapters),
LICENSE "Copyright (c) 2023 Fuma" (OSS attribution, all 7 LICENSE files
untouched), CHANGELOG.md history (accurate release records, left as-is).
Build: node 24, pnpm install clean; all 4 target apps next build GREEN
(spec, gui-docs, zen-docs, base-docs) + full package closure (18/18 turbo).
Gate: zero @hanzo-package fumadocs-/@fumadocs/ references remain.
57 lines
1.5 KiB
Python
57 lines
1.5 KiB
Python
import argparse
|
|
import json
|
|
import os
|
|
|
|
import griffe
|
|
from griffe_typingdoc import TypingDocExtension
|
|
|
|
from .mksource import CustomEncoder, parse_module
|
|
|
|
DOCSTRING_TYPE = "google"
|
|
STORE_SOURCE = True
|
|
|
|
def generate() -> None:
|
|
"""Generate Python API documentation for a specified module.
|
|
|
|
This function parses command-line arguments, loads the specified module,
|
|
parses its content, and saves the generated API documentation as a JSON file.
|
|
|
|
Args:
|
|
None
|
|
|
|
Returns:
|
|
None
|
|
|
|
Raises:
|
|
argparse.ArgumentTypeError: If invalid arguments are provided.
|
|
FileNotFoundError: If the specified module or output directory doesn't exist.
|
|
PermissionError: If there's no write permission for the output directory.
|
|
"""
|
|
parser = argparse.ArgumentParser(description="Generate python API documentation")
|
|
parser.add_argument(
|
|
"module", type=str, help="The module to generate documentation for"
|
|
)
|
|
parser.add_argument(
|
|
"--dir",
|
|
"-d",
|
|
type=str,
|
|
default=".",
|
|
help="The directory to save the documentation in",
|
|
)
|
|
args = parser.parse_args()
|
|
|
|
extensions = griffe.load_extensions(TypingDocExtension)
|
|
pkg = parse_module(
|
|
griffe.load(
|
|
args.module, docstring_parser="auto", store_source=STORE_SOURCE, extensions=extensions
|
|
)
|
|
)
|
|
api_filename = f"{args.module}.json"
|
|
|
|
with open(os.path.join(args.dir, api_filename), "w") as file:
|
|
json.dump(pkg, file, cls=CustomEncoder, indent=2, full=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
generate()
|