lexicongovernance / pluraltools-backend

Backend implementation of the plural voting tool.
https://demo.lexicongovernance.org/
GNU General Public License v3.0
3 stars 1 forks source link

Heart multipliers #268

Closed MartinBenediktBusch closed 7 months ago

MartinBenediktBusch commented 7 months ago

Overview

This PR add the necessary infrastructure to include heart multipliers in the plurality score calculation. In particular, the PR adds a multiplier table that defines the different multipliers and a usersToMultipliers table to store the user to multiplier relationships.

The PR assumes that the usersToMultipliers table is given (see below) and on that basis implements the heart multipliers by user in the vote service.

Furthermore, this PR adjusts the seed and implements test cases to verify that multiplier adjusted votes are calculated correctly.

What does the PR not implement

Importantly, the PR does not provide the usersToMultipliers service yet as it is unclear how this will be done as of right now. This will be done in a follow up issue: https://github.com/lexicongovernance/pluraltools-backend/issues/272

Furthermore, the PR does not refactor the vote service and does not implements more test cases that test the interaction between the multiplier and multiple groupings. This is the subject of a follow-up issue: https://github.com/lexicongovernance/pluraltools-backend/issues/262