Skip to main content

DOI DOI PyPi Python versions Build badge Unittests badge docs Code style: black codecov

abcvoting

[!NOTE]

For an overview of other software tools related to Computational Social Choice, see the COMSOC community page.

A Python library of approval-based committee (ABC) rules

Approval-based committee rules (ABC rules) are voting methods for selecting a committee, i.e., a fixed-size subset of candidates. ABC rules are also known as approval-based multi-winner rules. The input of such rules are approval ballots. We recommend the book (Multi-Winner Voting with Approval Preferences) by Lackner and Skowron [2] as a detailed introduction to ABC rules and related research directions. In addition, the survey by Faliszewski et al. [1] is useful as a more general introduction to committee voting (not limited to approval ballots).

The following ABC rules are implemented:

  • Approval Voting (AV)

  • Satisfaction Approval Voting (SAV)

  • Proportional Approval Voting (PAV)

  • Sequential Proportional Approval Voting (seq-PAV)

  • Reverse Sequential Proportional Approval Voting (revseq-PAV)

  • Approval Chamberlin-Courant (CC)

  • Phragmén's sequential rule

  • Monroe's rule

  • Minimax Approval Voting (MAV)

  • Greedy Monroe

  • Method of Equal Shares (Rule X)

  • Phragmén's First Method (Eneström's Method)

  • and many more ...

In addition, one can verify axiomatic properties such as

  • Justified Representation (JR)

  • Propotional Justified Representation (PJR)

  • Extended Justified Representation (EJR)

  • Priceability

  • The core property

Instead of using the abcvoting Python library, you can also use the abcvoting web application by Dominik Peters (which is based on this Python library).

Installation

As simple as:

pip install abcvoting

Further details can be found here.

Development

Install all dependencies including development requirements and the abcvoting package in development mode:

pip install -e ".[dev]"

Basic unit tests can be run by excluding tests which require additional dependencies:

pytest  -m "not ortools and not gmpy2 and not slow" tests/

For development, configure the black formatter and pre-commit hooks - see below. Also installing all optional dependencies is recommended.

A development package is build for every commit on the master branch and uploaded to the test instance of PyPI. It can be installed using the following command:

python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple abcvoting

Black formatting

Code needs to be formatted using the black formatter. This is checked by Github actions. Configure your editor to run the black formatter.

Pre-commit hooks

Pre-commit hooks are not required, but they are recommended for development. Pre-commit is used to manage and maintain pre-commit hooks. Install pre-commit (e.g. via apt, conda or pip) and then run $ pre-commit install to install the hooks.

References

[1] Piotr Faliszewski, Piotr Skowron, Arkadii Slinko, and Nimrod Talmon. Multiwinner voting: A new challenge for social choice theory. In Ulle Endriss, editor, Trends in Computational Social Choice, chapter 2, pages 27–47. AI Access, 2017. http://research.illc.uva.nl/COST-IC1205/BookDocs/Chapters/TrendsCOMSOC-02.pdf

[2] Lackner, Martin, and Piotr Skowron. "Multi-Winner Voting with Approval Preferences". Springer International Publishing, SpringerBriefs in Intelligent Systems , 2023. https://link.springer.com/book/10.1007/978-3-031-09016-5

Metadata

Release files for abcvoting 2.19.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abcvoting 2.19.2
File Size Uploaded
abcvoting-2.19.2.tar.gz 839.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for abcvoting 2.19.2
File Interpreter ABI Platform
abcvoting-2.19.2-py3-none-any.whl Python 3 none any Details

Total release size: 917.5 kB

Release files / abcvoting-2.19.2.tar.gz

Download URL abcvoting-2.19.2.tar.gz
Size 839.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bfff4172de25448b5ab7a65d90392a13998a4f3b5e810da7314bae1b519d9983
BLAKE2b-256 checksum
How to use checksums
5a25d6adc3a612406cf8b1d23d60ebc254fb19dc1c1986cc35553ebb254f89af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / abcvoting-2.19.2-py3-none-any.whl

Download URL abcvoting-2.19.2-py3-none-any.whl
Size 78.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae30cc565bf426b4317842042f0639f0cdeefc398e539d12d215f3b9c1407ac6
BLAKE2b-256 checksum
How to use checksums
5ebf42749ecb89245e6dfed82fcd2200a1da08415be30f07472787190ae22b9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

2.19.2 This release

2 release files

2.19.1

2 release files

2.18.1

2 release files

2.16.0

2 release files

2.15.0

1 release file

2.14.0

1 release file

2.13.0

1 release file

2.12.0

1 release file

2.11.0

1 release file

2.10.0

1 release file

2.9.0

1 release file

2.8.0

1 release file

2.7.1

1 release file

2.6.0

1 release file

2.5.0

1 release file

2.4.0

1 release file

2.3.0

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.1

1 release file

2.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page