hydra.build.comparereportlogic module

Pure snapshot-compare decision helpers: per-module status/diff-count and the whole-report tally, over content both sides already read.

hydra.build.comparereportlogic.build_report(inputs: Sequence[tuple[T0, tuple[object, object]]]) tuple[Sequence[tuple[T0, tuple[str, int]]], tuple[int, int]]

The whole compare-report (rows, byteEqCount, total) over enumerated module triples.

hydra.build.comparereportlogic.compare_module(name: T0, our_content: object, canon_content: object) tuple[T0, tuple[str, int]]

Compare one module (both sides pre-read) to a (name, statusTag, diffLines) triple.

hydra.build.comparereportlogic.diff_line_count(a: str, b: str) int

Symmetric count of lines present in one content but not the other.

hydra.build.comparereportlogic.module_names_from_entries(entries: Sequence[str]) Sequence[str]

The .json entries (sorted), with the .json suffix stripped, as module names.

hydra.build.comparereportlogic.render_report(report: tuple[Sequence[tuple[str, tuple[str, int]]], tuple[int, int]]) str

The formatted per-module lines plus the byte-identical tally line.

hydra.build.comparereportlogic.render_row(row: tuple[str, tuple[str, int]]) str

One report row rendered as a line: name: status[ (n lines differ)].

hydra.build.comparereportlogic.report_passed(report: tuple[T0, tuple[T1, T1]]) bool

Whether every compared module was byte-identical (byteEqCount == total).

hydra.build.comparereportlogic.strip_json_suffix(entry: str) str

Strip a trailing .json from an entry name, yielding the module name.