MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / createTempRepo

Function createTempRepo

src/eval.ts:70–83  ·  view source on GitHub ↗
(fixture: any)

Source from the content-addressed store, hash-verified

68 const precision = tp + fp > 0 ? tp / (tp + fp) : 1;
69 const recall = tp + fn > 0 ? tp / (tp + fn) : 1;
70 const f1 = precision + recall > 0 ? (2 * precision * recall) / (precision + recall) : 0;
71
72 return {
73 precision: Math.round(precision * 1000) / 1000,
74 recall: Math.round(recall * 1000) / 1000,
75 f1: Math.round(f1 * 1000) / 1000,
76 truePositives: tp,
77 falsePositives: fp,
78 falseNegatives: fn,
79 };
80}
81
82async function createTempRepo(fixture: any): Promise<string> {
83 const tmpDir = join(
84 (await import("node:os")).tmpdir(),
85 `codesight-eval-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`
86 );

Callers 1

evalFixtureFunction · 0.85

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected