Skip to content

feat: Metric/Measurement split#29

Merged
CasperTeirlinck merged 4 commits intomainfrom
feat/metric-measurement-split
Apr 21, 2026
Merged

feat: Metric/Measurement split#29
CasperTeirlinck merged 4 commits intomainfrom
feat/metric-measurement-split

Conversation

@CasperTeirlinck
Copy link
Copy Markdown
Contributor

@CasperTeirlinck CasperTeirlinck commented Apr 8, 2026

This PR refactors the use of Metrics as classes to Metrics as instances.
For background info and justification why, see this ADR: #28.

The main changes are:

  • Instantiate the Metric classes instead of using the class objects. This allows us to configure metrics using the constructor instead of subclassing.
  • Introduce a new class: Measurement. The Metric defines and configures the metric, the Measurement holds the value and diagnostic from that metric when it is measured.

Because this is a refactor of one of the core implementation details, this PR touches a lot of files, but edits in most files are quite minimal. The main changes are in src/checkup/metric.py and the other edits is making the other components work with the new Measurement class.

Comment thread docs/concepts/metrics.md Outdated
@CasperTeirlinck CasperTeirlinck merged commit b8c70a1 into main Apr 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants