mpylab.env.tem.history_traceability module¶
Cross-section traceability for modular TEM measurement-history reports.
- mpylab.env.tem.history_traceability.collect_history_traceability(section_results)
Collect cross-section traceability for a modular history report.
- Parameters:
section_results (iterable of mapping) – Generated report sections. Each entry must provide
selection, renderer-neutralreportdata, and asummarymapping.- Returns:
One row per report section with status, frequency coverage, dependencies, resolved and missing sources, completeness, and compact warnings. The row fields follow
TRACEABILITY_FIELDS.- Return type:
list of dict
- mpylab.env.tem.history_traceability.traceability_pdf_figure(rows)
Create a compact figure summarizing history traceability.
- Parameters:
rows (iterable of mapping) – Traceability rows to render. Dependencies and warnings are included beneath each section status.
- Returns:
A4-sized figure suitable for insertion into the combined PDF. The caller owns the figure and is responsible for closing it.
- Return type:
matplotlib.figure.Figure
- mpylab.env.tem.history_traceability.write_traceability_table(path, rows)
Write cross-section traceability rows as a TSV table.
- Parameters:
path (path-like) – Destination file. Missing parent directories are created.
rows (iterable of mapping) – Traceability rows, normally returned by
collect_history_traceability().
- Returns:
Destination path after writing the table.
- Return type:
pathlib.Path