Skip to main content

MetricSpec

CI Python License

Unit tests for business metrics. Contract testing for analytical meaning.

MetricSpec is a Python CLI for testing analytical contracts in local development and CI. It starts with deterministic DuckDB fixture tests and produces explainable diagnostics when a business metric returns the wrong answer.

Quick Start

From a local checkout before MetricSpec is published as a package:

uv sync --extra dev
uv run metricspec init demo
cd metricspec-demo
uv run --project .. metricspec run

After package publication, the same flow can use uvx without a checkout:

uvx metricspec init demo
cd metricspec-demo
uvx metricspec run

What MetricSpec Is

  • A contract test runner for business metrics.
  • A fixture-first semantic regression tool.
  • A CI-friendly way to catch wrong analytical answers.

What MetricSpec Is Not

  • A semantic layer.
  • A general data quality platform.
  • A hosted observability dashboard.

Status

The stable v1 core is DuckDB fixture-based contract testing. Additional adapters are experimental.

Documentation

Security

MetricSpec should not send telemetry or make hidden network calls. Keep credentials, production data, and secrets out of contracts, fixtures, issue reports, and CI artifacts.

Metadata

Release files for metricspec 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metricspec 0.1.0
File Size Uploaded
metricspec-0.1.0.tar.gz 105.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metricspec 0.1.0
File Interpreter ABI Platform
metricspec-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 127.4 kB

Release files / metricspec-0.1.0.tar.gz

Download URL metricspec-0.1.0.tar.gz
Size 105.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e328409a00ef409cce0b3933821aba7e096170ea85f83ff1080d101842d384fb
BLAKE2b-256 checksum
How to use checksums
34d4c98becfe89764e80445461a6ff0da3705f84071c694b884b576d09ec4e05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 29, 2026.

Transparency log

Release files / metricspec-0.1.0-py3-none-any.whl

Download URL metricspec-0.1.0-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffd597a319c4c007e3c9130944c0cb40fab429bfac6edc271ee33d050108462d
BLAKE2b-256 checksum
How to use checksums
5baae57664439c09d66d3e75b57dbe71b05c8eff00680c56b5c0ab09e96d97cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page