Skip to content

Made sure apportionment works with non-consecutive list/candidate numbers#2807

Open
Lionqueen94 wants to merge 7 commits intomainfrom
2785-make-sure-apportionment-works-with-non-consecutive-political-group-numbers
Open

Made sure apportionment works with non-consecutive list/candidate numbers#2807
Lionqueen94 wants to merge 7 commits intomainfrom
2785-make-sure-apportionment-works-with-non-consecutive-political-group-numbers

Conversation

@Lionqueen94
Copy link
Contributor

@Lionqueen94 Lionqueen94 commented Jan 30, 2026

Resolves #2785

@Lionqueen94 Lionqueen94 self-assigned this Jan 30, 2026
@Lionqueen94 Lionqueen94 changed the title WIP: Made sure apportionment works with non-consecutive list numbers WIP: Made sure apportionment works with non-consecutive list/candidate numbers Jan 30, 2026
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 97.11538% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.64%. Comparing base (af935ce) to head (aee734e).

Files with missing lines Patch % Lines
backend/apportionment/src/structs.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2807      +/-   ##
==========================================
+ Coverage   91.61%   91.64%   +0.03%     
==========================================
  Files         389      389              
  Lines       18716    18809      +93     
  Branches     2048     2048              
==========================================
+ Hits        17147    17238      +91     
- Misses       1467     1469       +2     
  Partials      102      102              

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

@Lionqueen94 Lionqueen94 force-pushed the 2785-make-sure-apportionment-works-with-non-consecutive-political-group-numbers branch from d00302c to b527a0c Compare February 2, 2026 21:41
@Lionqueen94 Lionqueen94 force-pushed the 2767-bring-back-apportionment-functions-and-tests branch from 7b9e8a3 to 3259c74 Compare February 3, 2026 13:52
@stacktraceghost stacktraceghost force-pushed the 2767-bring-back-apportionment-functions-and-tests branch 2 times, most recently from e5a5cb2 to 454cd2d Compare February 5, 2026 08:48
@Lionqueen94 Lionqueen94 force-pushed the 2767-bring-back-apportionment-functions-and-tests branch 2 times, most recently from b7bd452 to 2bcdcff Compare February 5, 2026 11:34
@Lionqueen94 Lionqueen94 force-pushed the 2785-make-sure-apportionment-works-with-non-consecutive-political-group-numbers branch from b527a0c to 715a590 Compare February 5, 2026 14:33
Base automatically changed from 2767-bring-back-apportionment-functions-and-tests to main February 6, 2026 11:15
@Lionqueen94 Lionqueen94 force-pushed the 2785-make-sure-apportionment-works-with-non-consecutive-political-group-numbers branch from bc82ce8 to 20e53db Compare February 6, 2026 11:19
@Lionqueen94 Lionqueen94 linked an issue Feb 6, 2026 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Sigrid maintainability feedback

⚠️ Your code did not improve towards your objective of 3.5 stars.

Show details

Sigrid compared your code against the baseline of 2026-02-06.

👍 What went well?

You fixed or improved 1 refactoring candidates.

Risk System property Location
🔴 Duplication
(Fixed)
backend/apportionment/src/seat_assignment/mod.rs line 132-137
backend/apportionment/src/seat_assignment/residual_seat_assignment.rs line 125-130

👎 What could be better?

Unfortunately, 2 refactoring candidates were introduced or got worse.

Risk System property Location
🔴 Duplication
(Introduced)
backend/apportionment/src/seat_assignment/mod.rs line 134-139
backend/apportionment/src/seat_assignment/residual_seat_assignment.rs line 125-130
🟡 Module Coupling
(Introduced)
backend/apportionment/src/structs.rs

📚 Remaining technical debt

9 refactoring candidates didn't get better or worse, but are still present in the code you touched.

View this system in Sigrid to explore your technical debt

⭐️ Sigrid ratings

System property System on 2026-02-06 Before changes New/changed code
Volume 3.4 N/A N/A
Duplication 3.7 5.1 5.2
Unit Size 2.2 2.2 2.2
Unit Complexity 3.3 2.9 2.9
Unit Interfacing 2.9 0.8 0.9
Module Coupling 3.4 5.5 3.3
Component Independence 2.0 N/A N/A
Component Entanglement 2.4 N/A N/A
Maintainability 2.9 3.6 3.0

💬 Did you find this feedback helpful?

We would like to know your thoughts to make Sigrid better.
Your username will remain confidential throughout the process.


View this system in Sigrid

@Lionqueen94 Lionqueen94 force-pushed the 2785-make-sure-apportionment-works-with-non-consecutive-political-group-numbers branch from 20e53db to 510ca9b Compare February 6, 2026 11:56
@Lionqueen94 Lionqueen94 marked this pull request as ready for review February 6, 2026 12:58
@Lionqueen94 Lionqueen94 requested a review from a team as a code owner February 6, 2026 12:58
@Lionqueen94 Lionqueen94 changed the title WIP: Made sure apportionment works with non-consecutive list/candidate numbers Made sure apportionment works with non-consecutive list/candidate numbers Feb 6, 2026
Re-added removed spaces in docstring (fmt is too strict here)
@Lionqueen94 Lionqueen94 enabled auto-merge February 6, 2026 13:08
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

PDF Diff Summary

Comparing against base branch: main

File Status
model-n-10-2.pdf ✅ No changes
model-na-14-2-bijlage1.pdf ✅ No changes
model-na-14-2.pdf ✅ No changes
model-na-31-2-bijlage1.pdf ✅ No changes
model-na-31-2-inlegvel.pdf ✅ No changes
model-na-31-2.pdf ✅ No changes
model-p-2a.pdf ✅ No changes

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.

Make sure apportionment works with non-consecutive list numbers

1 participant