← GDG /

#203 gdtest_display_funding

#203 gdtest_display_funding OK CONFIG
Funding with all fields.
Funding org with name, roles, homepage, and ROR identifier. Footer or sidebar should show the funding acknowledgment.
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_display_funding/
๐Ÿ“„ __init__.py
"""Package testing funding config with all fields."""

__all__ = ["fund", "report"]


def fund(project: str, amount: float) -> dict:
    """Record funding for a project.

    Parameters
    ----------
    project : str
        The name of the project to fund.
    amount : float
        The funding amount in dollars.

    Returns
    -------
    dict
        A dictionary with funding details.

    Examples
    --------
    >>> fund("research", 50000.0)
    {'project': 'research', 'amount': 50000.0}
    """
    return {"project": project, "amount": amount}


def report(grant_id: str) -> str:
    """Generate a funding report for a grant.

    Parameters
    ----------
    grant_id : str
        The identifier of the grant.

    Returns
    -------
    str
        A formatted funding report.

    Examples
    --------
    >>> report("NSF-001")
    'Grant NSF-001: active'
    """
    return f"Grant {grant_id}: active"
๐Ÿ“„ README.md
# gdtest-display-funding

Test funding config with all fields.
๐Ÿ“„ great-docs.yml
funding:
  name: National Science Foundation
  roles:
    - Funder
    - Copyright holder
  homepage: "https://nsf.gov"
  ror: "https://ror.org/021nxhr62"