def _mkconfigopts(cfg_opts): reg = TemplateRegistry() register_templates(reg, cfg_opts) for ct in cfg_opts.master_template_kwargs: reg.register(ct) resolver = TemplateResolver(**reg.to_kwargs()) return ConfigOpts.from_params(cfg_opts, resolver)
def _setup_template_resolver(m_config, master_template_args): ''' Build a template resovler using the template args from the master node. ''' reg = TemplateRegistry() register_templates(reg, m_config) for ct in master_template_args: reg.register(ct) return TemplateResolver(**reg.to_kwargs())