Links
AI / Agents
gdtest-ref-explicit
Test explicit reference config.
Reference config with explicit contents list defining which objects appear on the reference page and in what order.
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