Links
AI / Agents
gdtest-ref-module-expand
Test reference config with submodule expansion.
Reference config that references a submodule name. The builder should expand the module into its individual members.
Source files
gdtest_ref_module_expand/
__init__.py
"""Package with a submodule for reference expansion."""
from .utils import util_a, util_b, util_c
__all__ = ["main_func", "util_a", "util_b", "util_c"]
def main_func(data: str) -> str:
"""Process the main data input.
Parameters
----------
data : str
The data string to process.
Returns
-------
str
The processed data.
Examples
--------
>>> main_func("hello")
'HELLO'
"""
return data.upper()utils.py
"""Utility functions for the package."""
__all__ = ["util_a", "util_b", "util_c"]
def util_a(value: int) -> int:
"""Double the input value.
Parameters
----------
value : int
The value to double.
Returns
-------
int
The doubled value.
Examples
--------
>>> util_a(5)
10
"""
return value * 2
def util_b(text: str) -> str:
"""Reverse the input text.
Parameters
----------
text : str
The text to reverse.
Returns
-------
str
The reversed text.
Examples
--------
>>> util_b("abc")
'cba'
"""
return text[::-1]
def util_c(items: list) -> int:
"""Count the number of items in a list.
Parameters
----------
items : list
The list of items to count.
Returns
-------
int
The number of items.
Examples
--------
>>> util_c([1, 2, 3])
3
"""
return len(items)README.md
# gdtest-ref-module-expand Test reference config with submodule expansion.
great-docs.yml
reference:
- title: Core API
desc: Top-level functions
contents:
- name: main_func
- title: Utils API
desc: Utility functions
contents:
- name: utils