Add paperspec correct, check math forms and datasets, and give the tools public names

The work the other paper tools planned for paperspec (paperdesk PLAN M5.4,
paperform PLAN 4.2):

- paperspec correct and paperspec.revision apply proposed corrections to a
  package, folder or zip, and write it only once it validates.
- doc.math.form is checked: label and style commands always, the form's own
  spelling when papermath is installed or forms= is passed.
- paperspec.datasets and seven doc.dataset.* rules check a package's datasets.
- fixtures/invalid gains suspect-witness and math-form-label (33 in all).
- Canonical JSON reads numbers as doubles, so 1e20 round-trips.
- The registries and the JSON-LD context ship in the wheel.
- Public names for what paperdesk and paperform imported as private ones,
  with the old names kept as aliases.
- The text and lossy-projection functions are about three times faster
  through the gate, tested equal to the old code on every code point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013XwDhn4LkrKQfw4ArDEr2E
This commit is contained in:
alexmandClaude committed 2026-10-20 22:10:17 -04:00
1 parent 8c07dd7c15
commit 4fb8b4f5a7
70 files changed
+4470 -270

No files matched your search

+36 -1
View File
@@ -113,6 +113,41 @@
"description": "document.json's rev is not the number of corrections.",
"chapter": "spec/22-conformance.md"
},
{
"id": "doc.dataset.anchor",
"description": "A line of a dataset's anchors.jsonl does not match its schema, names no value of its resource's CSV, or has an anchor that does not resolve as current.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.dataset.file",
"description": "A dataset has no datapackage.json, or one of its files cannot be read: JSON that does not parse, anchors.jsonl not in canonical form, a CSV that does not read, or a resource whose path names no file of the dataset.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.dataset.id",
"description": "A dataset's folder is not named by its ID.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.dataset.key",
"description": "The primary key of a dataset's CSV resource is not unique.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.dataset.schema",
"description": "A dataset's datapackage.json does not match dataset.schema.json.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.dataset.unanchored",
"description": "A numeric value of a reported resource has no line in anchors.jsonl tying it to what prints it.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.dataset.value",
"description": "A value of a dataset's CSV is not, character for character after normalization, the text its anchor resolves to.",
"chapter": "spec/15-datasets.md"
},
{
"id": "doc.derived.math",
"description": "A line of derived/math.jsonl names a formula that is not TeX, says it is complete when its tree has an opaque node or the reverse, or lists symbols that are not the sym keys of its tree.",
@@ -220,7 +255,7 @@
},
{
"id": "doc.math.form",
"description": "A source with a form is not that form's canonical spelling. Only a validator that implements the form can check it; the reference validator does not.",
"description": "A source with a form is not that form's canonical spelling. The reference validator reports a scienting-math/1 source that holds a label or style command, which the form never does, and checks every source with papermath when it is installed.",
"chapter": "spec/03-nodes.md"
},
{