project.commented_yaml()
config as YAML: every field in declaration order, defaults filled in, described.
Usage
project.commented_yaml(
config,
header=None,
)Loading the text back gives config.model_dump(mode="json"). header lines are written first, as comments.