# Autodoc Configuration
# ======================
# Generates API documentation from Bengal's Python source and CLI

autodoc:
  # GitHub repository for source links (owner/repo format)
  # Used by "View source" links in generated documentation
  github_repo: "lbliii/bengal"
  github_branch: "main"  # Git branch for source links

  # Default description for generated documentation pages
  # If not set, modules will use "{module_name} package" as default
  # default_description: "API Documentation"

  # Python API Documentation
  python:
    enabled: true
    source_dirs:
      - ../bengal  # Document the main Bengal package
    docstring_style: auto  # Auto-detect docstring format

    # Output prefix for Python API docs
    # Empty = auto-derive from source_dirs (e.g., "api/bengal" from source_dirs: [../bengal])
    # Explicit value like "api/python" overrides auto-derivation
    output_prefix: ""  # Auto-derive from package name

    # Display name for sidebar and page headings
    # Overrides default "Python API Reference"
    display_name: "Bengal API Reference"

    # Exclude test, cache, build artifacts, and virtual environment files
    exclude:
      # Tests
      - "*/tests/*"
      - "*/test_*.py"
      - "*_test.py"
      # Build artifacts and caches
      - "*/__pycache__/*"
      - "*/migrations/*"
      - "*/.pytest_cache/*"
      - "*/build/*"
      - "*/dist/*"
      - "*.egg-info/*"
      # Virtual environments
      - "*/.venv/*"
      - "*/venv/*"
      - "*/.env/*"
      - "*/env/*"
      # Non-API directories
      - "*/scripts/*"
      - "*/benchmarks/*"
      # Hidden directories
      - "*/.*"

    # Member visibility
    include_private: false  # Skip _private methods
    include_special: false  # Skip __special__ methods

  # CLI Documentation
  cli:
    enabled: true
    app_module: "bengal.cli:cli"
    framework: milo

    # Output prefix for CLI docs
    # This creates the section at /cli/...
    output_prefix: "cli"

    # Display name for sidebar and page headings
    # Overrides default "CLI Reference"
    display_name: "Bengal CLI Reference"

  # OpenAPI Documentation
  openapi:
    enabled: true
    spec_file: "api/openapi.yaml"  # Relative to site root

    # Output prefix for OpenAPI docs
    # Empty string = auto-derive from spec title "Bengal Demo Commerce API"
    # This will create the section at /api/bengal-demo-commerce/...
    output_prefix: ""  # Auto-derive from spec title
