mrqart.html_email

HTML summary email with full dashboard attachment.

Controlled by MRQART_HTML_EMAIL_TOML env var. If not set, nothing is sent.

Functions

build_html_body(*, date_label, seq_summary, ...)

Build a condensed HTML email body.

load_html_email_entries(toml_path)

Load HTML email recipients from toml.

send_html_email(*, subject, html_body, ...)

Send HTML email using local mail command.

mrqart.html_email.build_html_body(*, date_label, seq_summary, missing_templates, totals, physicist_by_project, marquee_cols)[source]

Build a condensed HTML email body.

Parameters:
  • date_label (str)

  • seq_summary (Dict[Tuple[str, str, str], SeqSummary])

  • missing_templates (Dict[Tuple[str, str, str], Dict[str, Any]])

  • totals (Totals)

  • physicist_by_project (Mapping[str, str | None])

  • marquee_cols (List[str])

Return type:

str

mrqart.html_email.load_html_email_entries(toml_path)[source]

Load HTML email recipients from toml.

Parameters:

toml_path (Path)

Return type:

List[Dict[str, str]]

mrqart.html_email.send_html_email(*, subject, html_body, attachment_path, from_addr, to_addr, smtp_host, smtp_port=25)[source]

Send HTML email using local mail command.

Parameters:
  • subject (str)

  • html_body (str)

  • attachment_path (Path | None)

  • from_addr (str)

  • to_addr (str)

  • smtp_host (str)

  • smtp_port (int)

Return type:

bool