← GDG /

#106 gdtest_funding

#106 gdtest_funding OK CONFIG
Tests funding config
Tests funding config with all fields: name, roles, homepage, ror. The funding info should appear somewhere in the rendered site (sidebar or footer). Two functions (donate, sponsor).
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

K13
K13funding configconfig

Source Files

๐Ÿ“ gdtest_funding/
๐Ÿ“„ __init__.py
"""Package testing funding config."""

__version__ = "0.1.0"
__all__ = ["donate", "sponsor"]


def donate(amount: float) -> str:
    """
    Record a donation of the given amount.

    Parameters
    ----------
    amount
        The donation amount in dollars.

    Returns
    -------
    str
        A confirmation message.
    """
    return f"Donated ${amount:.2f}"


def sponsor(project: str) -> bool:
    """
    Sponsor a project by name.

    Parameters
    ----------
    project
        The name of the project to sponsor.

    Returns
    -------
    bool
        True if the sponsorship was successful.
    """
    return True
๐Ÿ“„ README.md
# gdtest-funding

Tests funding config.
๐Ÿ“„ great-docs.yml
funding:
  name: Science Foundation
  roles:
    - Funder
    - Sponsor
  homepage: "https://example.org/grant"
  ror: "https://ror.org/12345"