morphoclass.report.plumbing module¶
Module for creating Jinja reports.
-
morphoclass.report.plumbing.get_loader() → jinja2.loaders.PackageLoader¶ Get a jinja loader for morphoclass report templates.
- Returns
- Return type
The jinja package loader for morphoclass.
-
morphoclass.report.plumbing.list_templates() → set[str]¶ List the available jinja templates in morphoclass.
- Returns
- Return type
The set of template names in morphoclass.
-
morphoclass.report.plumbing.load_template(template_name: str) → Template | None¶ Load a given jinja template.
- Parameters
template_name – The name of the template (see list_templates()).
- Returns
- Return type
A jinja template.
-
morphoclass.report.plumbing.render(template: jinja2.environment.Template, template_vars: dict, output_path: pathlib.Path) → None¶ Generate a jinja HTML report.
- Parameters
template – The template to render.
template_vars – The template variables to interpolate into the template.
output_path – The path under which to save the HTML report.
-
morphoclass.report.plumbing.template_variables(template_name: str) → set[str] | None¶ List the template variables for a given template.
- Parameters
template_name – The name of the template (see list_templates()).
- Returns
If the template exists then a set of variable names that can be
interpolated into the template are returned. Otherwise, None is
returned.