Links
AI / Agents
gdtest-config-reference
Test package for reference config with sections.
Installation
pip install gdtest-config-referenceGet Started
- API Reference — Full API documentation
Source files
gdtest_config_reference/
__init__.py
"""Test package for reference config with sections.""" from gdtest_config_reference.core import compute, analyze from gdtest_config_reference.utils import format_result, clean_data
core.py
"""Core computation and analysis functions."""
def compute(x: float, y: float) -> float:
"""Compute the combined value of two numbers.
Parameters
----------
x : float
The first input value.
y : float
The second input value.
Returns
-------
float
The computed result.
Examples
--------
>>> compute(3.0, 4.0)
7.0
"""
return x + y
def analyze(data: list) -> dict:
"""Analyze a list of values and return summary statistics.
Parameters
----------
data : list
A list of numeric values to analyze.
Returns
-------
dict
A dictionary containing summary statistics such as mean
and count.
Examples
--------
>>> analyze([1, 2, 3])
{'mean': 2.0, 'count': 3}
"""
if not data:
return {"mean": 0.0, "count": 0}
return {"mean": sum(data) / len(data), "count": len(data)}utils.py
"""Utility functions for formatting and cleaning."""
def format_result(value: float, precision: int = 2) -> str:
"""Format a numeric result as a string.
Parameters
----------
value : float
The value to format.
precision : int, optional
The number of decimal places, by default 2.
Returns
-------
str
The formatted string representation.
Examples
--------
>>> format_result(3.14159, precision=3)
'3.142'
"""
return f"{value:.{precision}f}"
def clean_data(raw: list) -> list:
"""Clean a list of raw data by removing None values.
Parameters
----------
raw : list
The raw data list, possibly containing None values.
Returns
-------
list
A cleaned list with None values removed.
Examples
--------
>>> clean_data([1, None, 3, None, 5])
[1, 3, 5]
"""
return [x for x in raw if x is not None]great-docs.yml
reference:
- title: Core API
desc: Core functions
contents:
- name: compute
- name: analyze
- title: Utilities
desc: Helper utilities
contents:
- name: format_result
- name: clean_data