#045
gdtest_explicit_ref
OK
CONFIG
Explicit reference sections in great-docs.yml config
Reference structure is defined in great-docs.yml with two sections: 'Core' (MyClass with members=false, helper_func) and 'Utilities' (util_a, util_b). On the Reference page you should see exactly these two named sections โ not auto-generated ones. MyClass should appear WITHOUT its methods (members: false).
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 B1 C1 D1 E1 E6 F6 G1 H7
A1Flat layoutlayout
B1Explicit __all__exports
C1Functions onlyobjects
D1NumPydocstrings
E1E1
E6No directivesdirectives
F6No user guideuser_guide
G1README.mdlanding
H7No extrasextras
Source Files
gdtest_explicit_ref/
__init__.py
"""A package with explicit reference config sections."""
__version__ = "0.1.0"
__all__ = ["MyClass", "helper_func", "util_a", "util_b"]
class MyClass:
"""
A core class.
Parameters
----------
value
The initial value.
"""
def __init__(self, value: int):
self.value = value
def compute(self) -> int:
"""
Compute a result.
Returns
-------
int
The computed result.
"""
return self.value * 2
def reset(self) -> None:
"""Reset to zero."""
self.value = 0
def increment(self) -> None:
"""Increment value by one."""
self.value += 1
def decrement(self) -> None:
"""Decrement value by one."""
self.value -= 1
def to_string(self) -> str:
"""
Convert to string.
Returns
-------
str
String representation.
"""
return str(self.value)
def clone(self) -> "MyClass":
"""
Create a copy.
Returns
-------
MyClass
A new instance with the same value.
"""
return MyClass(self.value)
def helper_func(x: int) -> int:
"""
A core helper function.
Parameters
----------
x
Input value.
Returns
-------
int
Processed value.
"""
return x + 1
def util_a(name: str) -> str:
"""
Utility function A.
Parameters
----------
name
Input name.
Returns
-------
str
Formatted name.
"""
return name.upper()
def util_b(items: list) -> int:
"""
Utility function B.
Parameters
----------
items
A list of items.
Returns
-------
int
Number of items.
"""
return len(items)README.md
# gdtest-explicit-ref A package with explicit reference config.
great-docs.yml
reference:
- title: Core
desc: Core functionality
contents:
- name: MyClass
members: false
- helper_func
- title: Utilities
desc: Helper functions
contents:
- util_a
- util_b