PicnicSupermarket / dbt-score

Linter for dbt metadata
https://dbt-score.picnic.tech
MIT License
84 stars 7 forks source link

Auto-round scores down to align scores & medals #74

Closed japborst closed 1 month ago

japborst commented 1 month ago

Fixes #61.

The challenge is that a 9.99 score leads to a silver medal, even though 10.0 is printed as in HumanReadableFormatter we're rounding to a single decimal.

There are two approaches to this problem

Separately, you could argue this is only a problem for scores near thresholds and not in other instances (e.g. 3.35 might be fine to round to 3.4, but 9.99 should be displayed as 9.9).

To keep things simple, I've added a property on the Score model and used the rounded-down version in the human-readable formatter.

jochemvandooren commented 3 weeks ago

Thanks for fixing it @japborst ! :raised_hands: