← GDG /

#321 gdtest_ref_section_order

#321 gdtest_ref_section_order OK CONFIG
CLI-first reference section ordering via ref_section_order config
CLI-first package with ref_section_order: [cli, api, mcp] in config. The reference switcher tabs should appear CLI-first (cli,api) instead of the default (api,cli). The data-gd-ref-sections body attribute should be 'cli,api' since there is no MCP server.
View Site → Build Log ๐Ÿงช Test Coverage

Build Mode

● Has great-docs.yml

This package ships a pre-supplied config. The great-docs init step is skipped and great-docs build uses the spec-defined configuration directly. Tests specific config options and their rendered output.

Dimensions

A1 B1 C1 D1 E1 E6 F6 G1 H7
A1Flat layoutlayout
B1Explicit __all__exports
C1Functions onlyobjects
D1NumPydocstrings
E1E1
E6No directivesdirectives
F6No user guideuser_guide
G1README.mdlanding
H7No extrasextras

Source Files

๐Ÿ“ gdtest_ref_section_order/
๐Ÿ“„ __init__.py
"""A CLI-first package with custom reference section ordering."""

__version__ = "0.1.0"
__all__ = ["run_task", "TaskConfig"]


class TaskConfig:
    """
    Configuration for a task.

    Parameters
    ----------
    name
        The task name.
    timeout
        Timeout in seconds.
    """

    def __init__(self, name: str, timeout: int = 30):
        self.name = name
        self.timeout = timeout


def run_task(config: TaskConfig) -> str:
    """
    Run a task with the given configuration.

    Parameters
    ----------
    config
        The task configuration.

    Returns
    -------
    str
        Task result message.
    """
    return f"Task {config.name} completed"
๐Ÿ“„ cli.py
"""CLI entry point using Click."""

import click


@click.group()
def main() -> None:
    """gdtest-rso: a CLI-first tool for running tasks."""


@main.command()
@click.argument("name")
@click.option("--timeout", "-t", default=30, help="Timeout in seconds.")
def run(name: str, timeout: int) -> None:
    """Run a named task."""
    click.echo(f"Running {name} (timeout={timeout}s)")


@main.command()
def list() -> None:
    """List available tasks."""
    click.echo("task-a\ntask-b\ntask-c")
๐Ÿ“„ README.md
# gdtest-ref-section-order

A CLI-first test package demonstrating custom reference section ordering.
๐Ÿ“„ great-docs.yml
cli:
  enabled: true
mcp:
  enabled: false
ref_section_order:
  - cli
  - api