MCPcopy Create free account
hub / github.com/dbt-labs/ade-bench / load_diff_json

Function load_diff_json

scripts_python/render_file_diffs.py:19–30  ·  view source on GitHub ↗

Load the JSON diff data from the corresponding file_diffs.json file.

(diff_log_path: Path)

Source from the content-addressed store, hash-verified

17
18
19def load_diff_json(diff_log_path: Path) -> dict:
20 """Load the JSON diff data from the corresponding file_diffs.json file."""
21 json_path = diff_log_path.parent / "file_diffs.json"
22 if not json_path.exists():
23 return {}
24
25 try:
26 with open(json_path, "r") as f:
27 return json.load(f)
28 except Exception as e:
29 print(f"Warning: Could not load JSON diff data: {e}")
30 return {}
31
32
33def get_file_content(json_data: dict, file_path: str, snapshot_type: str = "after") -> str:

Callers 1

render_diff_log_htmlFunction · 0.85

Calls 2

openFunction · 0.85
loadMethod · 0.80

Tested by

no test coverage detected