Skip to content

v1.1.0

Compare
Choose a tag to compare
@jgibson517 jgibson517 released this 28 Nov 20:14
· 314 commits to main since this release
f9f1cea

Votekit 1.1.0 features a number of important functional and syntactical changes to the core Ballot, PreferenceProfile, and ElectionState objects. It also includes changes to ballot generation methods to output the correct number of ballots and allow for user-defined block names in the CambridgeSampler class. This release marks an overhaul to the library's documentation, and the addition of section explaining the social choice theory that underpins Votekit's functionality.

Key Changes

  • Method names for ElectionState methods
  • Caches for the results of run_election()
  • Ballot objects made immutable, using Pydantic dataclass
  • Parameter names for CambridgeSampler
  • BallotGraph now always displays vote totals for a ballot
  • ElectionState now prints the current round whenever printing
  • load_blt became load_scottish
  • plot_summary_stats always displays candidates in order inputted
  • PreferenceProfile data frame now has Percent column, removed the Weight Share column
  • Ballot object can take floats and integers as weights
  • Ballot attribute voter changed to voter_set

Additions

  • Added to_dict(), to_json() functions for ElectionState
  • Scores attribute to ElectionState
  • _rename_blocs method to CambridgeSampler to rename blocs to historical names.
  • Added reset and run_to_step methods to Election class
  • sort_by_weight parameter to head and tail methods of PreferenceProfile
  • received_votes parameter to get_candidates method of PreferenceProfile
  • __str__ method for Ballot

Bug Fixes

  • Multiple winners correctly ordered based off previous round's vote totals
  • CambridgeSampler correctly computes the frequency of opposing bloc ballots
  • PreferenceProfile no longer rounds all weights to integer when printing

Special thanks to Chris Donnay (@cdonnay) who made significant contributions to this release and is responsible for the improved tutorials and social choice theory sections of the documentation!