pelagos_py.steps.input_output.write_report_python#

class pelagos_py.steps.input_output.write_report_python.WriteDataReportPython(name, parameters=None, diagnostics=False, context=None)[source]#

Bases: pelagos_py.steps.base_step.BaseStep

Writes a PDF report summarising the data, plots and QC at the end of a pipeline.

The report is built directly with fpdf2, so no external toolchain (LaTeX, Sphinx) is required to produce the PDF. It opens with a title page (run provenance, pipeline name/description and a glider track map) and then writes a sequence of sections, each of which can be toggled off:

  • Cross-section plots — the headline view: PRES vs TIME panels, each coloured by a variable (temperature, salinity, density, oxygen, chlorophyll, backscatter).

  • Format Checker results — compliance-checker findings (only when the Format Checker step ran).

  • Configuration — the run configuration as paste-ready YAML.

  • Step diagnostics — the diagnostic plot(s) captured for each step.

  • Quality control summary — a table of QC test flag counts.

  • QC plots — a histogram per QC variable.

  • Logfile — the run log, terminal-styled.

  • Index — contents, QC flag glossary, variable index and glider information.

All parameters are optional. With no configuration a full report is written, named after the input file (see the first example below).

Parameters:
  • title (str, optional) – Report title, shown on the title page and running header. Defaults to a title derived from the input filename.

  • fname (str, optional) – Output .pdf filename. Defaults to the input filename core; a .pdf extension is appended if missing.

  • delete_figures (bool, optional) – When True (default) the plot images are written to a temporary folder and removed once the PDF is built. When False they are kept in a uniquely named folder beside the report so successive runs don’t overwrite each other.

  • show_cross_section_plots (bool, optional) – Include the cross-section plots section. Default True.

  • show_format_check (bool, optional) – Include the Format Checker results (when that step ran). Default True.

  • show_configuration (bool, optional) – Include the run configuration (YAML) section. Default True.

  • show_diagnostic_plots (bool, optional) – Include the per-step diagnostic plots section. Default True.

  • show_qc_summary (bool, optional) – Include the quality control summary table. Default True.

  • show_qc_plots (bool, optional) – Include the QC histogram plots section. Default True.

  • show_logs (bool, optional) – Include the logfile section. Default True.

  • show_index (bool, optional) – Include the closing index section. Default True.

Examples

The defaults write a full report, so the simplest valid configuration sets no parameters at all:

steps:
  - name: Write Data Report (Python)

Any subset of parameters may be supplied. The block below names the report, keeps the generated figures beside it, and omits the logfile section:

steps:
  - name: Write Data Report (Python)
    parameters:
      title: "SG579 Mission Report"
      fname: "sg579_report.pdf"
      delete_figures: false
      show_logs: false