Add the Zensical documentation of the Python package (docs/package, built by the docs workflow), merge the standard publish workflow with the setuptools-scm tag check, add the SPDX header rule to ruff, restructure the README, and point every repository and registry address at the Gitea organization papers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B8cL4zN4XpaQF5cBtASzfq
60 lines
1.8 KiB
Markdown
60 lines
1.8 KiB
Markdown
# Quick start
|
|
|
|
This page validates the repository's example paper, shows what a refusal looks like, and loads the paper into a database.
|
|
Run every command from the root of a checkout (see [Install](install.md)); the example is a synthetic chemistry paper in `fixtures/packages/hale2026harmonic-damb`.
|
|
|
|
## Validate a package
|
|
|
|
```sh
|
|
paperspec validate fixtures/packages/hale2026harmonic-damb
|
|
```
|
|
|
|
```text
|
|
fixtures/packages/hale2026harmonic-damb: valid
|
|
```
|
|
|
|
The exit status is 0.
|
|
A broken package prints one line per failure, as `package: where: rule: message`, and exits with status 1.
|
|
The folder `fixtures/invalid/` holds packages that each break one named rule:
|
|
|
|
```sh
|
|
paperspec validate fixtures/invalid/text-edited/package
|
|
```
|
|
|
|
```text
|
|
fixtures/invalid/text-edited/package: s0fn2fj: doc.hash.text-hash: text_hash does not recompute
|
|
fixtures/invalid/text-edited/package: s0fn2fj: doc.hash.match-hash: match_hash does not recompute
|
|
…
|
|
```
|
|
|
|
Each rule ID, such as `doc.hash.text-hash`, is listed in <https://paperspec.scient.ing/registry/rules.json> with the chapter of the specification that states it.
|
|
|
|
## Load it into SQLite
|
|
|
|
```sh
|
|
paperspec load --sqlite lab.db fixtures/packages/hale2026harmonic-damb
|
|
```
|
|
|
|
```text
|
|
hale2026harmonic-damb: 75 nodes
|
|
```
|
|
|
|
The command validates the package first, creates `lab.db` with the tables of `sql/`, and loads the package.
|
|
Query the result with any SQLite client; Python's own works:
|
|
|
|
```sh
|
|
python -m sqlite3 lab.db "SELECT kind, COUNT(*) FROM nodes GROUP BY kind ORDER BY 2 DESC, kind LIMIT 3"
|
|
```
|
|
|
|
```text
|
|
('cell', 23)
|
|
('sentence', 18)
|
|
('row', 6)
|
|
```
|
|
|
|
## Where next
|
|
|
|
- [Validate a package](../guides/validate-a-package.md), including how to try a correction without writing it.
|
|
- [Load packages into SQLite](../guides/load-into-sqlite.md).
|
|
- [Use the library](../guides/use-the-library.md) from Python.
|