mathema-ci
mathema in CI: measure a project's implementation, intent and clarity, keep the triangle in its README, and gate each change on the debt it adds. The measurement is mathema's; this package runs it and renders it.
pip install mathema-ci installs it with mathema 0.6.6.1 or a later 0.6.
measure
Runs the tests under coverage, records the claims with mathema verify,
scores the project, prints what it found, keeps the triangle in a block
between <!-- mathema:badges:start --> and <!-- mathema:badges:end -->
in the README, and exits as the tests did.
mathema-ci measure --out
--out writes the badge files to .mathema/badges/, --target MODULE
scores the functions defined in MODULE, --stage keeps the claims read
from the tests that hold, and everything after -- goes to pytest. The
overall is the area spanned by all three scores. More in docs/measure.md.
init
Writes a pull or merge request template and the CI workflow that runs
mathema verify, only where a file is missing.
mathema-ci init [--provider github|gitlab|both] [--dry-run]
More in docs/init.md.
gate
Fails a change that makes a claim falsified or unknown, opens a
regression on it, or lowers clarity, on a function it touches. It runs no tests, so it runs
after mathema verify or measure.
mathema-ci gate [--base REF] [--base-snapshot REF:PATH | --remeasure]
[--remeasure-budget SECONDS] [--format text|json]
How it finds the base and what blocks: docs/gate.md.
In CI
GitHub Actions:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: pip install -e . mathema-ci
- run: mathema-ci measure --out
- run: mathema-ci gate
if: github.event_name == 'pull_request'
GitLab CI:
mathema:
image: python:3.12
script:
- pip install -e . mathema-ci
- mathema-ci measure --out
- if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then mathema-ci gate; fi
The pytest plugin that writes the test ledger is described in docs/test-ledger.md.
Licence
Apache License 2.0, as mathema-language. The measurement this package
runs is mathema's, under mathema's own licence. See LICENSE and
NOTICE. The mathema name and the triangle mark are trademarks of
Tetrion Ltd and are not licensed under the Apache License (its section 6
grants no trademark rights).
Metadata
Release files for mathema-ci 0.1.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 |
|---|---|---|---|---|
| mathema_ci-0.1.0.tar.gz | 134.9 kB | With provenance | Details for mathema_ci-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mathema_ci-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mathema_ci-0.1.0-py3-none-any.whl |
Total release size: 215.5 kB
Release files / mathema_ci-0.1.0.tar.gz
| Download URL | mathema_ci-0.1.0.tar.gz |
|---|---|
| Size | 134.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98d13c1080a600483787547f9c563ca76363761ea85dda1fb41ba0945b0d5517
|
|
BLAKE2b-256 checksum How to use checksums |
c21ee1c16a9ee636e1e431d13319ac69a23f14553efe4d17e24a1b07b6e8bfef
|
| 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 19, 2026.
Transparency logRelease files / mathema_ci-0.1.0-py3-none-any.whl
| Download URL | mathema_ci-0.1.0-py3-none-any.whl |
|---|---|
| Size | 80.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18c4b9a2011fbee5382918f0172a94d291cbc71dd5b10fee1e477d9123de5b76
|
|
BLAKE2b-256 checksum How to use checksums |
d13dace4ca5bda4f2672cee95d1ffab1b920e053111b2710b2072269bd9a7e9c
|
| 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 19, 2026.
Transparency logSecurity for mathema-ci 0.1.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 mathema_ci-0.1.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 19, 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.