feat: rename to paperspec and add the website
- 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>
This commit is contained in:
213 files changed
+1233
-386
No files matched your search
+3
-3
@@ -1,12 +1,12 @@
|
||||
# Schemas
|
||||
|
||||
This folder holds the JSON (JavaScript Object Notation) Schemas (draft 2020-12) for every file and record that the manuspec formats (manuspec is the specification this repository holds) define: 39 schema files.
|
||||
This folder holds the JSON (JavaScript Object Notation) Schemas (draft 2020-12) for every file and record that the paperspec formats (paperspec is the specification this repository holds) define: 39 schema files.
|
||||
A JSON Schema is a file, itself written in JSON, that states what a valid JSON file looks like.
|
||||
Newcomers can read it as a form: it lists the fields a record must have and what kind of value each field takes.
|
||||
Implementers will find the loading recipe and the traps under "Validating" and "Writing schemas".
|
||||
Experts will find the chapter and status of each format under "Which schema for which file" and "What a schema does not check".
|
||||
|
||||
Each schema's `$id`, its own address as a name, is `https://scient.ing/ns/schemas/<file>`.
|
||||
Each schema's `$id`, its own address as a name, is `https://paperspec.scient.ing/schemas/<file>`.
|
||||
Schemas refer to each other by those names, and a validator (a program that checks a file against a schema) that loads the whole folder resolves every reference.
|
||||
The `$id` base is normative and stays as it is.
|
||||
The `scienting-` prefix on format identifiers such as `scienting-anchor/1` is the formats' namespace, a separate matter from the repository's name.
|
||||
@@ -57,7 +57,7 @@ validator.validate(json.load(open("fixtures/records/anchor-span.json")))
|
||||
|
||||
It raises no error when run from the repository root, since `anchor-span.json` is a valid anchor.
|
||||
A schema refers to another by a relative name, and the `Registry` object resolves it.
|
||||
Here `anchor.schema.json` points to `common.schema.json#/$defs/key`, which a validator resolves against the `$id` above into `https://scient.ing/ns/schemas/common.schema.json`.
|
||||
Here `anchor.schema.json` points to `common.schema.json#/$defs/key`, which a validator resolves against the `$id` above into `https://paperspec.scient.ing/schemas/common.schema.json`.
|
||||
The `Registry` maps that name to the file's contents, so nothing is fetched over the network.
|
||||
`Draft202012Validator(schemas["anchor.schema.json"])` fails with `Unresolvable: common.schema.json#/$defs/key` when the `Registry` is missing.
|
||||
Never load a schema alone.
|
||||
|
||||
Reference in new issue
Block a user