spiri-docs
Sphinx extension for Spiri controlled documents — operational manuals and anything else with a revision number that someone outside the company relies on.
# docs/conf.py
extensions = ["myst_parser", "spiri_docs"]
Everything follows from a revisions.yaml beside docs/:
document_number: SPIRI-OM-001
regulator_facing: true
distribution_statement: Uncontrolled when printed.
revisions:
- revision: "1.0"
date: 2026-07-19
effective_date: 2026-08-01
author: A. Author
approver: B. Approver
summary: Initial issue.
On every build the extension:
- validates the file — a
regulator_facingdocument without aneffective_dateorapproverfails the build rather than shipping; - sets
versionandreleaseto the current revision; - exposes
{{ document_number }},{{ revision }},{{ effective_date }},{{ approver }}and friends as MyST substitutions for the cover page; - stamps document number, revision and
Page N of Minto the PDF footer; - names the PDF
SPIRI-OM-001_rev1.0.pdf.
A document for software has a second number: the release it describes, which moves
separately from the revision. Set SPIRI_DOCS_SOFTWARE_VERSION in the build, and that
version joins the footer and the filename (SPIRI-OM-001_rev1.0_v0.8.0.pdf) and is
available as {{ software_version }}. Without it, nothing changes.
And provides one directive:
```{revision-history}
which renders the history newest-first, showing only the columns the document
actually populates.
## Why an extension and not the template
`spiri-doc-template` runs once, at project generation. This runs on every build.
Validation, revision plumbing, and PDF document control have to hold every time
the docs are built — a template can only put a correct file down on day one and
has no way to detect drift afterwards. Theme, CSS and structure stay in the
template, where being decided once is the point.
## Configuration
| Option | Default | Meaning |
| --- | --- | --- |
| `spiri_docs_revisions` | `"../revisions.yaml"` | Path to the revision file, relative to `conf.py`. |
## Not here yet
Hazard admonitions (DANGER / WARNING / CAUTION / NOTICE). Which standard to
follow — ANSI Z535.6, ISO 3864 — is an editorial decision, and shipping markup
before it is made means migrating every manual later. Sphinx's built-in
`danger`, `warning`, `caution` and `note` are fine in the meantime.
Metadata
Release files for spiri-docs 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spiri_docs-0.3.0.tar.gz | 59.2 kB | With provenance | Details for spiri_docs-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spiri_docs-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for spiri_docs-0.3.0-py3-none-any.whl |
Total release size: 89.1 kB
Release files / spiri_docs-0.3.0.tar.gz
| Download URL | spiri_docs-0.3.0.tar.gz |
|---|---|
| Size | 59.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62245942a1b34ef0a07083ea978bdf94c2712c729a136771ebbbbf850d02effe
|
|
BLAKE2b-256 checksum How to use checksums |
a650b46ec5f46b1a36f75ff98c66818ec3d88668aae7f8ac95dfa0f10a18309a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / spiri_docs-0.3.0-py3-none-any.whl
| Download URL | spiri_docs-0.3.0-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9da60b0fd4f1f8e82ed5aa27fa6975eae9a015d5c0c64b1134e827419a57691b
|
|
BLAKE2b-256 checksum How to use checksums |
b7ea1e7c3e84f59ca550ea8a6c4a67d35b685e778efbb4bc0f44836c228cb1a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for spiri-docs 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for spiri_docs-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.