← GDG /

#101 gdtest_cli_name

#101 gdtest_cli_name OK CONFIG
Tests cli.name: mytool config
Tests cli.name: 'mytool' (explicit CLI name). The CLI reference should show 'mytool' as the command name. Has a Click app with two commands (run, status).
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

K8
K8cli.name explicitconfig

Source Files

๐Ÿ“ gdtest_cli_name/
๐Ÿ“„ __init__.py
"""Package testing cli.name mytool config."""

__version__ = "0.1.0"
__all__ = ["process", "summarize"]


def process(data: list) -> list:
    """
    Process a list of data items.

    Parameters
    ----------
    data
        The input data to process.

    Returns
    -------
    list
        The processed data.
    """
    return data


def summarize(data: list) -> str:
    """
    Summarize a list of data items.

    Parameters
    ----------
    data
        The input data to summarize.

    Returns
    -------
    str
        A summary of the data.
    """
    return ""
๐Ÿ“„ cli.py
import click


@click.group()
def cli():
    """MyTool CLI."""
    pass


@cli.command()
def run():
    """Run the process."""
    click.echo("Running...")


@cli.command()
def status():
    """Show status."""
    click.echo("Status: OK")
๐Ÿ“„ README.md
# gdtest-cli-name

Tests cli.name: mytool config.
๐Ÿ“„ great-docs.yml
cli:
  enabled: true
  module: gdtest_cli_name.cli
  name: mytool