Skip to content

refactor: Measurements wrapper#34

Merged
CasperTeirlinck merged 1 commit intofeat/metric-multi-instancefrom
feat/measurements-wrapper
May 7, 2026
Merged

refactor: Measurements wrapper#34
CasperTeirlinck merged 1 commit intofeat/metric-multi-instancefrom
feat/measurements-wrapper

Conversation

@CasperTeirlinck
Copy link
Copy Markdown
Contributor

@CasperTeirlinck CasperTeirlinck commented Apr 29, 2026

Add a Measurements class to hold the collection of measurements and their mapping to metrics. Triggered by this comment.

This aims to make the interface more intuitive and cleaner for metrics. Since #31 introduces a list of Measurements, the "default" case of one measurement per metric now required indexing which looks ugly. I added a get_single helper function to the Metric but the long type hint dict[type[Metric], list[Measurement]] remained.

This touches a lot of files because it changes the API for Metrics, but the main addition is here: src/checkup/measurement.py.

Also cleaned up some test files.

@CasperTeirlinck CasperTeirlinck changed the title feat: Measurements wrapper refactor: Measurements wrapper Apr 30, 2026
@CasperTeirlinck CasperTeirlinck merged commit 1151a0a into feat/metric-multi-instance May 7, 2026
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