← GDG /

#255 gdtest_numpy_seealso_desc

#255 gdtest_numpy_seealso_desc OK CONFIG
NumPy-style See Also sections with descriptions. Tests that 'name : description' entries survive the post-render merge.
Four functions with NumPy-style See Also sections containing 'name : description' entries. Tests that descriptions survive the post-render merge step and appear in the final rendered output.
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 D1 L22
A1Flat layoutlayout
D1NumPydocstrings
L22See Also sectiondocstring

Source Files

๐Ÿ“ gdtest_numpy_seealso_desc/
๐Ÿ“„ __init__.py
"""Package with NumPy-style See Also sections including descriptions."""

__version__ = "0.1.0"
__all__ = ["connect", "disconnect", "send", "receive"]


def connect(host: str, port: int = 8080) -> object:
    """
    Open a connection to a remote host.

    Parameters
    ----------
    host
        The hostname or IP address.
    port
        The port number.

    Returns
    -------
    object
        A connection handle.

    See Also
    --------
    disconnect : Close an open connection.
    send : Transmit data over a connection.
    """
    return object()


def disconnect(conn: object) -> None:
    """
    Close an open connection.

    Parameters
    ----------
    conn
        The connection handle to close.

    See Also
    --------
    connect : Open a new connection.
    """
    pass


def send(conn: object, data: bytes) -> int:
    """
    Send data over a connection.

    Parameters
    ----------
    conn
        An open connection handle.
    data
        The data to transmit.

    Returns
    -------
    int
        Number of bytes sent.

    See Also
    --------
    receive : Read data from a connection.
    connect : Open a new connection first.
    """
    return len(data)


def receive(conn: object, size: int = 1024) -> bytes:
    """
    Receive data from a connection.

    Parameters
    ----------
    conn
        An open connection handle.
    size
        Maximum number of bytes to read.

    Returns
    -------
    bytes
        The received data.

    See Also
    --------
    send : Transmit data over a connection.
    disconnect : Close the connection when done.
    """
    return b""
๐Ÿ“„ README.md
# gdtest-numpy-seealso-desc

A synthetic test package testing NumPy See Also description preservation.
๐Ÿ“„ great-docs.yml
parser: numpy