def documented_conf(): """A root configuration with documentation.""" return ConfigNode('documented-conf', desc=''' foo bar baz ''')
def documented_setting(): """A leaf-node configuration with documentation.""" return ConfigNode('documented-setting', VDR.V_STRING, desc=''' foo bar baz ''')
def default_setting(): """A leaf-node configuration with a default.""" return ConfigNode('default-setting', VDR.V_STRING, default='x')
def option_setting(): """A leaf-node configuration with options.""" return ConfigNode('option-setting', VDR.V_STRING, options=['a', 'b', 'c'])
def simple_setting(): """A leaf-node configuration.""" return ConfigNode('simple-setting', VDR.V_STRING)
def documented_spec(): """A configuration tree with documentation.""" with ConfigNode('documented-conf', desc='a\nb\nc') as spec: with ConfigNode('documented-section', desc='d\ne'): ConfigNode('documented-setting', VDR.V_STRING, desc='f\ng') return spec
def simple_conf(): """A root configuration.""" return ConfigNode('simple-conf')
def simple_section(): """A configuration section.""" return ConfigNode('simple-section')