Files
paperspec/pyproject.toml
T
alexmandClaude 30d310f64d Publish the package and its documentation, and move to the papers organization
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
2026-10-19 04:23:49 -04:00

91 lines
3.9 KiB
TOML

# Package metadata only, and the build mapping setuptools needs. Tool settings live in their own files:
# pixi.toml (environments + tasks), .ruff.toml (lint/format), ty.toml (types), .pytest.ini (tests),
# .coveragerc (coverage).
# Deviation from the studio standard: setuptools with setuptools-scm instead of hatchling with hatch.toml.
# The package maps schemas/, sql/ and vectors/ from the repository root as data subpackages, and takes its
# version from git tags.
[build-system]
requires = ["setuptools>=80", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "paperspec"
dynamic = ["version"]
description = "The scienting formats: the reference implementation of every rule, with the JSON Schemas, SQL and test vectors as package data"
readme = "README.md"
# The code (src/) is Apache-2.0 and the schemas, SQL and vectors it carries are CC0-1.0, as LICENSE.md says.
license = "Apache-2.0 AND CC0-1.0"
license-files = ["LICENSE.md"]
authors = [{ name = "Scientific Computing Studio", email = "maintainer@scient.ing" }]
# Python 3.14 is the only version with the Unicode 16.0 character data the specification pins (spec/01 §1.4);
# 3.13 has 15.1 and 3.15 has 17.0, and the package refuses to import on either.
requires-python = ">=3.14,<3.15"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
]
# The base package is standard library only. `schema.py` needs jsonschema and
# `crypto.py` needs cryptography; the repository's own tools need both.
dependencies = []
[project.optional-dependencies]
schema = ["jsonschema>=4.26", "referencing>=0.35"]
crypto = ["cryptography>=46"]
tools = ["paperspec[crypto,schema]"]
# One command with subcommands: paperspec validate, load, check, build, stress and site; `paperspec --help`
# says which work anywhere and which need a checkout.
[project.scripts]
paperspec = "paperspec.cli.main:main"
[project.urls]
Homepage = "https://docs.scient.ing/paperspec/"
Documentation = "https://docs.scient.ing/paperspec/"
Specification = "https://paperspec.scient.ing"
Repository = "https://git.scient.ing/papers/paperspec"
Changelog = "https://git.scient.ing/papers/paperspec/src/branch/main/CHANGELOG.md"
# PEP 735 dependency groups (pip >= 25.1: `pip install -e ".[tools]" --group dev`).
# pixi.toml mirrors these for conda-forge environments. The tests need the `tools` extra as well.
[dependency-groups]
test = ["pytest>=8.4", "pytest-cov>=6", "hypothesis>=6.130"]
lint = ["ruff>=0.17.1,<0.18", "ty>=0.0.89,<0.0.90"]
dev = [
{ include-group = "test" },
{ include-group = "lint" },
"pre-commit>=4",
"build>=1.2",
"twine>=6.1",
]
# The code is `src/paperspec`. The schemas, SQL and vectors stay at the repository root, where the
# specification links to them and the website serves the schemas at their `$id` URLs, and travel with the
# package as data subpackages, so a consumer reads them with importlib.resources. That mapping is why the
# packages are listed rather than found.
[tool.setuptools]
packages = ["paperspec", "paperspec.cli", "paperspec.schemas", "paperspec.sql", "paperspec.vectors"]
[tool.setuptools.package-dir]
"" = "src"
"paperspec.schemas" = "schemas"
"paperspec.sql" = "sql"
"paperspec.vectors" = "vectors"
[tool.setuptools.package-data]
"paperspec.schemas" = ["*.json"]
"paperspec.sql" = ["*.sql"]
"paperspec.vectors" = ["*.jsonl"]
# The package version comes from git tags (v0.1.1 builds as 0.1.1, later commits as 0.1.2.devN); CONTRIBUTING.md
# says how it relates to the format version that CHANGELOG.md and pixi.toml carry. A source tree without git
# history, such as a downloaded archive, builds as 0+unknown instead of failing.
[tool.setuptools_scm]
fallback_version = "0+unknown"
version_file = "src/paperspec/_version.py"
version_scheme = "guess-next-dev"
local_scheme = "node-and-timestamp"