- Rename manuspec to paperspec everywhere outside pixi.toml: prose, the tools, provenance tool names and the fixture key derivations, so every fixture and vector is rebuilt. - Move the namespace addresses under the site, mirroring the repository: schema $id https://paperspec.scient.ing/schemas/<file>, the JSON-LD context https://paperspec.scient.ing/context/scienting-1.jsonld, and term IRIs https://paperspec.scient.ing/vocab#<term>. Format identifiers (scienting-*) and URNs (urn:scienting:) are unchanged. - tools/site.py (standard library only) builds _site/: every file of the repository at its own path, each Markdown file rendered as a page with sidebar navigation, heading anchors matching the forge's, folder listings, a vocabulary page for the context's IRIs, a heading search and a 404 page; light and dark themes. - check.py builds the site and checks that every Markdown file has a page, every internal link and fragment resolves, no Markdown is left unrendered, and every $id, the context address and the vocabulary IRIs are files of the site. - deploy/: a Caddyfile with the media types and CORS the data needs, and a guide; .gitea/workflows/site.yml builds on main and publishes with rsync when the SITE_* secrets are set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
676 lines
13 KiB
JSON
676 lines
13 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://paperspec.scient.ing/schemas/node.schema.json",
|
|
"title": "Node",
|
|
"description": "One line of nodes.jsonl; spec/03-nodes.md.",
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
"kind": {
|
|
"$ref": "common.schema.json#/$defs/nodeKind"
|
|
},
|
|
"parent": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"ord": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 256
|
|
},
|
|
"attrs": {
|
|
"type": "object",
|
|
"properties": {
|
|
"level": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"columns": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
"header_path": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"header_path"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"column": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"rowspan": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"colspan": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"role": {
|
|
"enum": [
|
|
"data",
|
|
"column-header",
|
|
"row-header",
|
|
"row-group-header"
|
|
]
|
|
},
|
|
"header_path": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
}
|
|
},
|
|
"ordered": {
|
|
"type": "boolean"
|
|
},
|
|
"marker": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"variant": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"image": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sha256": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"media_type": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"native": {
|
|
"type": "boolean"
|
|
},
|
|
"dpi": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"sha256",
|
|
"media_type",
|
|
"native"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"crop": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sha256": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"media_type": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"dpi": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"sha256",
|
|
"media_type",
|
|
"dpi"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"figure_text": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"role": {
|
|
"enum": [
|
|
"axis-label",
|
|
"tick-label",
|
|
"legend",
|
|
"annotation",
|
|
"other"
|
|
]
|
|
},
|
|
"page_fp": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"boxes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "common.schema.json#/$defs/box"
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"text",
|
|
"role"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"required": [],
|
|
"additionalProperties": false,
|
|
"minProperties": 1
|
|
},
|
|
"content": {},
|
|
"withheld": {
|
|
"const": true
|
|
},
|
|
"fidelity": {
|
|
"$ref": "common.schema.json#/$defs/level"
|
|
},
|
|
"prov": {
|
|
"type": "object",
|
|
"properties": {
|
|
"witnesses": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
"minItems": 1,
|
|
"uniqueItems": true
|
|
},
|
|
"backend": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"reading": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"corroborated_by": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "common.schema.json#/$defs/nodeId"
|
|
},
|
|
"uniqueItems": true
|
|
}
|
|
},
|
|
"required": [],
|
|
"additionalProperties": false
|
|
},
|
|
"text_hash": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"match_hash": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"align_key": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"own_hash": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
},
|
|
"node_hash": {
|
|
"$ref": "common.schema.json#/$defs/hash"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"kind",
|
|
"parent",
|
|
"ord",
|
|
"text_hash",
|
|
"match_hash",
|
|
"align_key",
|
|
"own_hash",
|
|
"node_hash"
|
|
],
|
|
"additionalProperties": false,
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"enum": [
|
|
"sentence",
|
|
"cell",
|
|
"reference",
|
|
"authors",
|
|
"keywords"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"withheld"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"$ref": "runs.schema.json"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"enum": [
|
|
"equation",
|
|
"equation-line"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"withheld"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notation": {
|
|
"enum": [
|
|
"tex",
|
|
"typst"
|
|
]
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required": [
|
|
"notation",
|
|
"source"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"enum": [
|
|
"code",
|
|
"algorithm"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"withheld"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"type": "object",
|
|
"properties": {
|
|
"language": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"text"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"not": {
|
|
"enum": [
|
|
"sentence",
|
|
"cell",
|
|
"reference",
|
|
"authors",
|
|
"keywords",
|
|
"equation",
|
|
"equation-line",
|
|
"code",
|
|
"algorithm"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"not": {
|
|
"anyOf": [
|
|
{
|
|
"required": [
|
|
"content"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"withheld"
|
|
]
|
|
},
|
|
{
|
|
"required": [
|
|
"fidelity"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"not": {
|
|
"enum": [
|
|
"section",
|
|
"figure",
|
|
"panel",
|
|
"table",
|
|
"theorem",
|
|
"footnote",
|
|
"equation",
|
|
"equation-line",
|
|
"reference",
|
|
"code",
|
|
"algorithm"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"not": {
|
|
"required": [
|
|
"label"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "section"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"required": [
|
|
"attrs"
|
|
],
|
|
"properties": {
|
|
"attrs": {
|
|
"required": [
|
|
"level"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"not": {
|
|
"enum": [
|
|
"section",
|
|
"table",
|
|
"cell",
|
|
"row",
|
|
"list",
|
|
"item",
|
|
"theorem",
|
|
"panel"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"not": {
|
|
"required": [
|
|
"attrs"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "section"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"level"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "table"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"columns"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "cell"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"column",
|
|
"rowspan",
|
|
"colspan",
|
|
"role"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "row"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"header_path"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "list"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"ordered"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "item"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"marker"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "theorem"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"variant"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"kind": {
|
|
"const": "panel"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"properties": {
|
|
"attrs": {
|
|
"propertyNames": {
|
|
"enum": [
|
|
"image",
|
|
"crop",
|
|
"figure_text"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|