Reorganize paperspec commands and pin dependency versions (#2)
check / check (push) Successful in 52s
site / site (push) Successful in 1m45s

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
alexm committed 2026-10-15 09:53:05 -04:00
1 parent 4fa326dc76
commit 78101dc0db
65 files changed
+2360 -298

No files matched your search

+4 -3
View File
@@ -82,8 +82,9 @@ The other folders help people use the specification.
| `registry/` | Formats, rule IDs, stamp rules and the default stage requirements. | Yes |
| `vectors/` | Test vectors, one case per line. | Yes |
| `fixtures/` | Valid packages and records, invalid packages, and the keys that signed them. | Yes |
| `tools/` | The programs that compute and check the vectors and fixtures, and load packages into SQLite. | No |
| `src/` | The Python package `paperspec`: the reference implementation, and the `paperspec` command that computes and checks the vectors and fixtures and loads packages into SQLite. | No |
| `tools/` | How to run those commands. | No |
| `docs/` | Guides for people getting to know the formats. | No |
The programs in `tools/` compute every expected value, so that none is typed by hand.
They are not a library, and implementations conform to the chapters and the vectors.
The reference implementation in `src/paperspec/` computes every expected value, so that none is typed by hand.
Other repositories of the project import it, but implementations conform to the chapters and the vectors, not to it.
+1 -1
View File
@@ -46,7 +46,7 @@ Stored text is kept exactly as witnessed; normalization applies only when a valu
The vectors in `normalize.jsonl` cover the cases, including the angstrom sign, which NFC turns into Å.
Normalization forms, General Categories and the `White_Space` property are those of Unicode 16.0.
A later Unicode version can change a decomposition or a category, and with it a hash, so an implementation states the Unicode version its character data comes from, the reference tools refuse to run on another, and moving the formats to a later version is a change to every format that hashes text ([0.3](00-introduction.md#03-format-identifiers-and-versions)).
A later Unicode version can change a decomposition or a category, and with it a hash, so an implementation states the Unicode version its character data comes from, the reference implementation refuses to import on another, and moving the formats to a later version is a change to every format that hashes text ([0.3](00-introduction.md#03-format-identifiers-and-versions)).
## 1.5 Character offsets
+1 -1
View File
@@ -67,7 +67,7 @@ A correction is refused, naming the rule ([22](22-conformance.md)), when:
11. the result breaks a rule of [3](03-nodes.md).
The gate needs only the document's current state, so a tool can run it on a proposal before applying anything, and get back the record the correction would append or the rule it breaks.
`tools/validate.py --correction` does this against a package.
`paperspec validate --correction` does this against a package.
Digits are characters of General Category Nd in the plain projection.
A package's corrections are also checked as a whole: indexes run from 1 without gaps, each `id` derives from its record, `rev` equals their number, every retired ID is in `ids.jsonl`, and the last correction of each leaf ends at its current `node_hash`.
+1 -1
View File
@@ -6,7 +6,7 @@
| --- | --- | --- |
| `vectors/*.jsonl` | Inputs and expected outputs, one case per line. | Computes every expected output from its input. |
| `fixtures/packages/` | Valid packages: a converted chemistry paper with corrections, receipts, a multi-level-header table and a dataset; its checks-only export; an open-access paper with two witnesses; a Typst draft; a tiny document, as a folder and as the zip of [12.2](12-package.md#122-paths). | Accepts each, and recomputes every value it contains. |
| `fixtures/records/` | A valid record of every other format that is a JSON file of its own; the stage requirements and stamp rules are in `registry/`, and a bundle is built by `tools/load.py --bundle`. | Accepts each. |
| `fixtures/records/` | A valid record of every other format that is a JSON file of its own; the stage requirements and stamp rules are in `registry/`, and a bundle is built by `paperspec load --bundle`. | Accepts each. |
| `fixtures/invalid/` | Invalid packages, each with `expect.json` naming the rule it breaks. | Refuses each, and SHOULD name that rule. |
| `fixtures/keys/` | The test keys that signed the fixtures and the team secret of the checks-only export. | Never uses them for anything else. |