Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metricspec-0.1.0.tar.gz (105.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metricspec-0.1.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file metricspec-0.1.0.tar.gz.

File metadata

  • Download URL: metricspec-0.1.0.tar.gz
  • Upload date:
  • Size: 105.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for metricspec-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e328409a00ef409cce0b3933821aba7e096170ea85f83ff1080d101842d384fb
MD5 f92edb29a76ca50461c322c44b7a03f0
BLAKE2b-256 34d4c98becfe89764e80445461a6ff0da3705f84071c694b884b576d09ec4e05

See more details on using hashes here.

Provenance

The following attestation bundles were made for metricspec-0.1.0.tar.gz:

Publisher: publish.yml on johnmikel/metricspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file metricspec-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: metricspec-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for metricspec-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffd597a319c4c007e3c9130944c0cb40fab429bfac6edc271ee33d050108462d
MD5 907a12be12d34e553aacdddd88c1c284
BLAKE2b-256 5baae57664439c09d66d3e75b57dbe71b05c8eff00680c56b5c0ab09e96d97cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for metricspec-0.1.0-py3-none-any.whl:

Publisher: publish.yml on johnmikel/metricspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page