asp_plot.report_pipeline#
Declarative report pipeline for the asp_plot CLI.
This module decouples the report-generation pipeline from Click. The CLI
(asp_plot.cli.asp_plot) parses options, packs them into a
ReportConfig, and calls run_report() – which is importable and
callable from notebooks and tests without any Click context.
The body of the report is a declarative section registry
(REPORT_SECTIONS): each entry is a ReportSpec pairing an
enabled(ctx) predicate with a build(ctx) function that returns the
report sections to append. The orchestrator iterates the registry in order,
so section ordering and figure numbering are data, not source-line position.
Captions live in asp_plot.report_captions.
Attributes#
Classes#
All inputs needed to generate a report, decoupled from Click. |
|
Mutable runtime state shared across section builders. |
|
One declarative report section. |
Functions#
|
Generate the ASP processing report described by |
Module Contents#
- class asp_plot.report_pipeline.ReportConfig#
All inputs needed to generate a report, decoupled from Click.
Field names and defaults mirror the CLI options one-for-one so the Click wrapper can splat its parsed params straight in.
- class asp_plot.report_pipeline.ReportContext#
Mutable runtime state shared across section builders.
Built once by
_setup_context(), then threaded through everyReportSpecso builders can pull shared plotters/selections and draw sequential figure filenames without a module-global counter.- config: ReportConfig#
- report_metadata: asp_plot.report.ReportMetadata | None = None#
- stereo_plotter: asp_plot.stereo.StereoPlotter#
- class asp_plot.report_pipeline.ReportSpec#
One declarative report section.
enabled(ctx)gates the section on config/runtime state;build(ctx)runs the plotting and returns theReportSection/AlignmentReportPageobjects to append (possibly several, possibly none).- build: Callable[[ReportContext], List[object]]#
- enabled: Callable[[ReportContext], bool]#
- asp_plot.report_pipeline.run_report(config: ReportConfig) str#
Generate the ASP processing report described by
config.Builds the runtime context, iterates the declarative
REPORT_SECTIONSregistry to assemble the report body, compiles the PDF, writes the figure-selections sidecar, and cleans up. Returns the path to the written PDF. Importable and callable without any Click context.
- asp_plot.report_pipeline.REPORT_SECTIONS: List[ReportSpec]#