← GDG /

#189 gdtest_ref_single_section

#189 gdtest_ref_single_section OK CONFIG
Reference with one named section containing all exports.
Reference with a single named section containing all exports. Everything under one heading.
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

P5
P5Multi-section refreference

Source Files

๐Ÿ“ gdtest_ref_single_section/
๐Ÿ“„ __init__.py
"""Test package for reference with a single named section."""

from .api import alpha, beta, delta, gamma

__all__ = ["alpha", "beta", "delta", "gamma"]
๐Ÿ“„ api.py
"""Complete API with four functions."""


def alpha(x: int) -> int:
    """Apply the alpha transformation.

    Parameters
    ----------
    x : int
        The input value.

    Returns
    -------
    int
        The transformed value.

    Examples
    --------
    >>> alpha(5)
    10
    """
    return x * 2


def beta(x: int) -> int:
    """Apply the beta transformation.

    Parameters
    ----------
    x : int
        The input value.

    Returns
    -------
    int
        The transformed value.

    Examples
    --------
    >>> beta(5)
    25
    """
    return x ** 2


def gamma(x: int, y: int) -> int:
    """Combine two values using the gamma operation.

    Parameters
    ----------
    x : int
        The first input value.
    y : int
        The second input value.

    Returns
    -------
    int
        The combined result.

    Examples
    --------
    >>> gamma(3, 4)
    7
    """
    return x + y


def delta(x: int) -> float:
    """Compute the delta of a value.

    Parameters
    ----------
    x : int
        The input value.

    Returns
    -------
    float
        The delta result.

    Examples
    --------
    >>> delta(10)
    5.0
    """
    return x / 2.0
๐Ÿ“„ README.md
# gdtest-ref-single-section

Test reference with a single named section.
๐Ÿ“„ great-docs.yml
reference:
  - title: Complete API
    desc: All functions
    contents:
      - name: alpha
      - name: beta
      - name: gamma
      - name: delta