Refactor: lay the repo out by section (core, collection, analysis, planner, site) (#8)
Moves only; no behaviour changes. Every file now lives under the part of the project it belongs to, each section has a README, and docs/PRIVACY.md collects the rules all parts follow. core/ engine.js, graph.js, solver.js, python/clean.py collection/ sources/ (form, register, PDF check, daily update), bot/ (importer) analysis/ stats/ (Python statistics), network/ (build-graph.js), reports/ (POLICY.md) planner/ build-policy.js, policy-report.js site/ atlas/ (the page), build.js, qa/ tests/ core/ (unit), parity/ (JS vs Python), fixtures/ Checked against the previous layout: tests pass; coded runs, test outputs, graph.json and policy.json are byte-identical; the built site differs only in comments that name file paths. The published file names Ken's bot downloads (solver.js, graph.js, data/policy.json) are unchanged. Also removes the undefined/ folder of QA screenshots committed by mistake (the QA scripts now default to a temp folder) and test.txt, and drops the unused npm workspaces. Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
dcd5117373
commit
432e04c2c7
@@ -0,0 +1,13 @@
|
||||
// node tests/parity/run_engine.js data/public/form_responses.json out_dir
|
||||
// Runs the browser engine in Node and writes coded runs + results, for comparison with Python.
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const E = require("../../core/engine.js");
|
||||
const [, , src = "data/public/form_responses.json", outDir = "tests/out"] = process.argv;
|
||||
const raw = JSON.parse(fs.readFileSync(src, "utf8"));
|
||||
const { runs, missing } = E.codeRows(raw.rows, raw.headers);
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(outDir, "runs_js.json"), JSON.stringify(runs));
|
||||
const res = E.analyse(runs, {});
|
||||
fs.writeFileSync(path.join(outDir, "results_js.json"), JSON.stringify(res, null, 1));
|
||||
console.log(`${runs.length} runs coded; missing columns: ${missing.join(", ") || "none"}`);
|
||||
Reference in New Issue
Block a user