Files
paperspec/docs/package/start/install.md
T
2026-10-19 04:33:03 -04:00

3.1 KiB

Install

The package needs Python 3.14. Its base install has no dependencies: every module imports with the standard library alone. Three extras add what some modules need:

Extra Adds Needed by
schema jsonschema, referencing schema validation, so package.validate and corrections.gate
crypto cryptography Ed25519 signatures and HKDF in crypto, which the signature and receipt checks use
tools both of the above the paperspec command, and any program that validates packages

From Scienting's package registry

The registry does not mirror PyPI, so an installer needs two indexes: the registry for paperspec, and PyPI for jsonschema, referencing and cryptography. Tie paperspec to the registry wherever the installer allows it, so that a package of the same name on PyPI is never chosen instead. [CHECK: no version tag has been pushed yet, so the registry holds no release until the first tag is published]

With pixi, in pixi.toml:

[pypi-dependencies]
paperspec = { version = ">=0.1.1", extras = ["tools"], index = "https://git.scient.ing/api/packages/papers/pypi/simple" }

With uv, in pyproject.toml:

[[tool.uv.index]]
name = "scienting"
url = "https://git.scient.ing/api/packages/papers/pypi/simple"
explicit = true

[tool.uv.sources]
paperspec = { index = "scienting" }

With pip, which cannot tie a package to an index and takes the highest version from either:

pip install --index-url https://git.scient.ing/api/packages/papers/pypi/simple/ --extra-index-url https://pypi.org/simple/ "paperspec[tools]"

If the organization or the package is private, the installer also needs a token with the read:package scope, for example in a ~/.netrc entry for git.scient.ing.

From a checkout

Clone the repository and let pixi set up a pinned environment, with the package installed editable:

git clone https://git.scient.ing/papers/paperspec
pixi install
pixi run check

pixi run check runs the formatter, the linter, the type checker, the Markdown lint, the tests and the repository's own checker, and ends with All checks pass. Without pixi, install the checkout with pip install -e ".[tools]" --group dev on Python 3.14.

The pixi tasks

Task Does
check Every check CI runs, in order: fmt-check, lint, typecheck, lint-md, test, verify.
verify paperspec check, the repository's own checker.
quick paperspec check --quick, which skips the byte-for-byte rebuild.
fmt, fmt-check Format the code with ruff, or check the formatting.
lint, lint-fix Lint with ruff, or lint and apply the safe fixes.
typecheck Type-check src/ with ty.
test, cov Run the pytest suite, or run it with branch coverage that fails under 90%.
lint-md Lint every Markdown file with markdownlint.
build, load, validate, stress, site The commands of the same names.
hooks Install the git pre-commit hooks.
docs-build, docs-serve Build these pages strictly into build/docs, or preview them.
dist Build the sdist and wheel into dist/.