MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / load_checkfiles

Function load_checkfiles

scripts/drift_engine.py:38–55  ·  view source on GitHub ↗

鍔犺浇鎸囧畾鐩綍涓嬬殑鎵€鏈?checkfile

(checkfiles_dir: str)

Source from the content-addressed store, hash-verified

36
37def load_checkfiles(checkfiles_dir: str) -> List[Dict[str, Any]]:
38 """鍔犺浇鎸囧畾鐩綍涓嬬殑鎵€鏈?checkfile"""
39 checkfiles = []
40 checkfiles_path = Path(checkfiles_dir)
41
42 if not checkfiles_path.exists():
43 print(f"[Warning] Checkfiles directory not found: {checkfiles_dir}")
44 return []
45
46 for f in sorted(checkfiles_path.glob("*.json")):
47 try:
48 data = json.loads(f.read_text(encoding="utf-8"))
49 data["_source_file"] = f.name
50 checkfiles.append(data)
51 except Exception as e:
52 print(f"[Warning] Failed to load checkfile {f.name}: {e}")
53
54 return checkfiles
55
56
57DRIFT_SHIFT_THRESHOLD = 0.30
58DRIFT_RECOVER_THRESHOLD = 0.12

Callers 2

mainFunction · 0.90
load_default_checkfilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected