nirspipe.qc.boilerplate.generate#

Auto-generate Methods paragraph and reference list for the report.

Module Contents#

Functions#

generate_methods_text

Methods prose for one run, from what its sidecars record.

step_sentence

One line saying what a step did, for a table rather than a paragraph.

collect_software_versions

API#

nirspipe.qc.boilerplate.generate.generate_methods_text(versions: dict[str, str] | None = None, nirs_dir: Any = None, label: str | None = None, steps: list[tuple[str, dict]] | None = None) → dict[str, str]#

Methods prose for one run, from what its sidecars record.

steps is the step list itself, already slot-filled (see template_slots()), for a caller that assembles it from more than one place: a dyad’s paragraph continues from the files its members were read from into steps that left no file. Otherwise nirs_dir is scanned, scoped to the run label names.

nirspipe.qc.boilerplate.generate.step_sentence(step: str | None, params: dict) → str#

One line saying what a step did, for a table rather than a paragraph.

The Methods sentence where there is one, without its citations; otherwise the plain description of a bookkeeping step. Empty for a step this module has never heard of.

nirspipe.qc.boilerplate.generate.collect_software_versions() → dict[str, str]#