MCPcopy Create free account
hub / github.com/idank/explainshell / _comparison_data

Function _comparison_data

tests/evals/render/render_eval.py:423–438  ·  view source on GitHub ↗
(
    base_dir: Path, current_dir: Path
)

Source from the content-addressed store, hash-verified

421
422
423def _comparison_data(
424 base_dir: Path, current_dir: Path
425) -> tuple[dict[str, Any], dict[str, Any], list[str], dict[str, list[str]]]:
426 baseline = _load_summary(base_dir)
427 current = _load_summary(current_dir)
428 base_pages = _page_map(baseline)
429 current_pages = _page_map(current)
430 paths = sorted(set(base_pages) | set(current_pages))
431 suspicious: dict[str, list[str]] = {}
432 for path in paths:
433 reasons = _suspicious_changes(
434 path, base_pages.get(path), current_pages.get(path)
435 )
436 if reasons:
437 suspicious[path] = reasons
438 return baseline, current, paths, suspicious
439
440
441def compare_runs(args: argparse.Namespace) -> int:

Callers 2

compare_runsFunction · 0.85
diff_reportFunction · 0.85

Calls 3

_load_summaryFunction · 0.90
_page_mapFunction · 0.90
_suspicious_changesFunction · 0.85

Tested by

no test coverage detected