Add approval+runoff and blanket primary variants (issue #17)#44
Draft
endolith wants to merge 8 commits into
Draft
Add approval+runoff and blanket primary variants (issue #17)#44endolith wants to merge 8 commits into
endolith wants to merge 8 commits into
Conversation
PR Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44 +/- ##
==========================================
+ Coverage 96.31% 97.15% +0.83%
==========================================
Files 19 20 +1
Lines 489 632 +143
==========================================
+ Hits 471 614 +143
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implement top-n plurality primaries with IRV, contingent runoff, or Condorcet generals (Final Four/Five and table variants), IRV-to-slate primaries with IRV or runoff generals, and approval primary with ranked pairwise general (unified primary). Export from elsim.methods and extend tests. Co-authored-by: endolith <endolith@gmail.com>
Add unit tests for primary ties, Condorcet cycles, runoff/IRV None paths, approval runoff edges, and IRV-to-slate primaries. Drop unreachable approval validation and IRV primary inner break; duplicate checks lived only in approval_runoff. Co-authored-by: endolith <endolith@gmail.com>
Use Find-the-winner openings, borda-style ballot descriptions, full tiebreaker and Returns wording, and explicit Wikipedia hyperlinks in RST (including section fragments) instead of :wikipedia: roles where anchors apply. Add Examples to irv_primary_top_n_* wrappers; expand module docstring. Co-authored-by: endolith <endolith@gmail.com>
Cite IJCAI approval-with-runoff (DOI), Alaska Division of Elections RCV page, FairVote Top Four PDF, St. Louis sample ballot PDF, Gehl & Porter HBS report, Condorcet 1785 (BnF Gallica), Hare 1859 (Internet Archive), and Electoral Reform Society supplementary vote page. Expand module docstring and wrapper references to match. Co-authored-by: endolith <endolith@gmail.com>
Remove prose about how references are organized; tighten Condorcet and Final Five narrative lines. Co-authored-by: endolith <endolith@gmail.com>
Fold sequential IRV slate selection into irv as a keyword-only parameter. Remove irv_eliminate_to_n and irv_primary_top_n_irv (same outcome as irv). Clarify top_n_runoff versus runoff on the full field; fix doc references and remove St. Louis / mismatched Alaska prose. Co-authored-by: endolith <endolith@gmail.com>
…ases Rename irv(..., n_survivors=) to n_winners. Capitalize reform names in docs, spell out contingent vote, add Unified Primary synonym to approval_runoff. Remove top_four_* and top_five_* wrappers; use top_n_* with n=4 or 5. Replace supplementary-vote ref with contingent vote for top_n_runoff. Co-authored-by: endolith <endolith@gmail.com>
c1023db to
094a181
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Latest:
irv(..., n_winners=...)(renamed fromn_survivors); docstrings use Unified Primary, Top Four vs Final Five, and spell out “general election using the contingent vote” where relevant;top_n_runoffcites contingent vote instead of supplementary vote; removedtop_four_*/top_five_*one-line wrappers in favor oftop_n_*withn=4or5.