Step 1 of moving the repo to Python with declarative rules. - core/spec/form.yaml: every question (how it is found in an export), every answer and what it is coded as, missing answers, email redaction, burn order, first-dragon pools. - core/atlas/coding.py reads it and replaces core/python/clean.py (python -m atlas.coding). - tests/core/test_coding.py: 16 rule tests, one hand-written row per rule, checking the rules are right rather than only that JS and Python agree. - analysis/stats/analyze.py takes the colours and missing answers from the spec instead of its own copy; the daily update job codes rows through the package. - pyproject.toml for the package; pyyaml and pytest added to requirements. The coded runs are byte-identical to before (5,988 runs); all parity checks still match. Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.2 KiB
JSON
23 lines
1.2 KiB
JSON
{
|
|
"name": "threshing-atlas",
|
|
"private": true,
|
|
"description": "Route probabilities and path-finding for the Dragonkind threshing",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"build": "node site/build.js",
|
|
"dev": "node site/build.js && python3 -m http.server 8000 -d dist",
|
|
"test:js": "node tests/parity/run_engine.js data/public/form_responses.json tests/out",
|
|
"test:py": "PYTHONPATH=core python3 -m atlas.coding && cd analysis/stats && PYTHONPATH=../../core python3 analyze.py && cd ../.. && PYTHONPATH=core python3 -m unittest discover -s tests/core -p 'test_*.py'",
|
|
"test:parity": "python3 tests/parity/compare_runs.py && python3 tests/parity/compare_results.py && python3 tests/parity/compare_routes.py",
|
|
"test:unit": "node --test tests/core/graph.test.js tests/core/solver.test.js",
|
|
"test": "npm run test:js && npm run test:py && npm run test:parity && npm run test:unit",
|
|
"graph": "node analysis/network/build-graph.js",
|
|
"import-bot": "node collection/bot/import-bot.js",
|
|
"check-sources": "python3 collection/sources/update_sources.py",
|
|
"policy": "node --max-old-space-size=6000 planner/build-policy.js && node planner/policy-report.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|