Skip to content

Allow normalising the resolution function#140

Merged
henrikjacobsenfys merged 4 commits intodevelopfrom
normalise-resolution
Mar 26, 2026
Merged

Allow normalising the resolution function#140
henrikjacobsenfys merged 4 commits intodevelopfrom
normalise-resolution

Conversation

@henrikjacobsenfys
Copy link
Member

Added methods to normalise the resolution function to have area 1.

The ideal solution does not modify the resolution_model directly but instead uses a copy. However, copy is currently broken and requires quite a bit of work to be fixed (will happen after moving to EasyList), and so this is an intermediate fix.

Closes #138

@henrikjacobsenfys henrikjacobsenfys added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] medium Normal/default priority labels Mar 26, 2026
@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.75%. Comparing base (8d97ad8) to head (08cc148).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #140   +/-   ##
========================================
  Coverage    97.74%   97.75%           
========================================
  Files           37       37           
  Lines         2486     2493    +7     
  Branches       421      422    +1     
========================================
+ Hits          2430     2437    +7     
  Misses          32       32           
  Partials        24       24           
Flag Coverage Δ
integration 0.00% <0.00%> (ø)
unittests 97.75% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henrikjacobsenfys henrikjacobsenfys linked an issue Mar 26, 2026 that may be closed by this pull request
Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than a small nitpick, this is ready to merge

Comment on lines +372 to +373
assert total_area == 1.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe pytest.approx(1.0) so you don't compare floats explicitly?

@henrikjacobsenfys henrikjacobsenfys merged commit cec1976 into develop Mar 26, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] medium Normal/default priority [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The area of the resolution does not get normalized

2 participants