Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted rules & weighted properties #68

Merged
merged 9 commits into from
Mar 29, 2023

Conversation

DominikPeters
Copy link
Contributor

@DominikPeters DominikPeters commented Mar 28, 2023

  • generalize property checks to weighted profiles
    • I did not implement weighted brute-force checks for PJR and EJR, since those require design decisions (currently, these iterate over voter groups of specific size; with weights we would probably need to iterate over all subsets of voters or switch to iterating over subsets of candidates)
  • weighted rules:
    • remove NotImplementedError for phragmen-enestrom for weighted profile (was actually already implemented)
    • fix weighted version of consensus-rule
    • generalize equal-shares (and its variants) to work for weighted profiles
  • test weighted rules and weighted property checks using convert_to_weighted (property truth values and rule outputs should be invariant under this operation)

It's probably best to wait a few days before merging this PR to see whether anything comes up.

@codecov-commenter
Copy link

Codecov Report

Merging #68 (ac5f8f8) into master (99dcd6e) will increase coverage by 0.07%.
The diff coverage is 86.58%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   91.13%   91.20%   +0.07%     
==========================================
  Files          11       11              
  Lines        3418     3389      -29     
  Branches     1071     1067       -4     
==========================================
- Hits         3115     3091      -24     
+ Misses        176      173       -3     
+ Partials      127      125       -2     
Impacted Files Coverage Δ
abcvoting/abcrules_ortools.py 84.81% <ø> (-0.19%) ⬇️
abcvoting/fileio.py 81.21% <0.00%> (ø)
abcvoting/properties.py 94.51% <86.15%> (+1.13%) ⬆️
abcvoting/abcrules.py 93.20% <92.85%> (-0.04%) ⬇️
abcvoting/preferences.py 93.20% <100.00%> (+0.97%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99dcd6e...ac5f8f8. Read the comment docs.

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.

3 participants