#184
gdtest_ref_explicit
OK
CONFIG
Explicit reference config listing specific objects in named sections.
Reference config with explicit contents list defining which objects appear on the reference page and in what order.
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
P1
P1Explicit referencereference
Source Files
gdtest_ref_explicit/
__init__.py
"""Test package for explicit reference config.""" from .builders import build, compile_source from .runners import execute, run __all__ = ["build", "compile_source", "execute", "run"]
builders.py
"""Builder functions for compiling and building targets."""
def build(target: str) -> None:
"""Build the specified target.
Parameters
----------
target : str
The target to build.
Returns
-------
None
Examples
--------
>>> build("main")
"""
pass
def compile_source(source: str) -> bytes:
"""Compile source code into bytes.
Parameters
----------
source : str
The source code to compile.
Returns
-------
bytes
The compiled bytecode.
Examples
--------
>>> compile_source("print('hello')")
b'...'
"""
return source.encode()runners.py
"""Runner functions for executing commands and scripts."""
def run(cmd: str) -> int:
"""Run a shell command and return the exit code.
Parameters
----------
cmd : str
The command to run.
Returns
-------
int
The exit code of the command.
Examples
--------
>>> run("echo hello")
0
"""
return 0
def execute(script: str) -> str:
"""Execute a script and return its output.
Parameters
----------
script : str
The script to execute.
Returns
-------
str
The output of the script execution.
Examples
--------
>>> execute("print('hi')")
'hi'
"""
return "hi"README.md
# gdtest-ref-explicit Test explicit reference config.
great-docs.yml
reference:
- title: Builders
desc: Build functions
contents:
- name: build
- name: compile_source
- title: Runners
desc: Execution
contents:
- name: run
- name: execute