MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / parseArgs

Function parseArgs

scripts/fungrim/validate.ts:34–71  ·  view source on GitHub ↗
(argv: string[])

Source from the content-addressed store, hash-verified

32
33const PASS_RATE_GATE = 0.99;
34
35/** Path to the committed Stage-1 report (written by report.ts to this dir). */
36const REPORT_PATH = path.join(
37 path.dirname(fileURLToPath(import.meta.url)),
38 'validation-report.json'
39);
40
41function parseArgs(argv: string[]): {
42 corpus: string;
43 numeric: boolean;
44 topic?: string;
45 id?: string;
46 seed: number;
47 check: boolean;
48} {
49 const args = {
50 corpus: 'data/fungrim',
51 numeric: false,
52 topic: undefined as string | undefined,
53 id: undefined as string | undefined,
54 seed: 42,
55 check: false,
56 };
57 for (let i = 2; i < argv.length; i++) {
58 switch (argv[i]) {
59 case '--corpus':
60 args.corpus = argv[++i];
61 break;
62 case '--numeric':
63 args.numeric = true;
64 break;
65 case '--topic':
66 args.topic = argv[++i];
67 break;
68 case '--id':
69 args.id = argv[++i];
70 break;
71 case '--seed':
72 args.seed = Number(argv[++i]);
73 break;
74 case '--check':

Callers 1

mainFunction · 0.70

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected