Note that the doc was written first, as we followed the pattern: doc, test, code It was pretty nice, and it helped a lot.master
parent
2fe66eb1bb
commit
9a66f784d0
@ -0,0 +1,7 @@
|
|||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="Majority Judgment Poll Toolkit"
|
||||||
|
description="Majority Judgment poll resolution and display utilities."
|
||||||
|
author="MieuxVoter"
|
||||||
|
version="1.0"
|
||||||
|
script="plugin.gd"
|
@ -0,0 +1,64 @@
|
|||||||
|
tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
Various utilities to help deliberate using Majority Judgment.
|
||||||
|
|
||||||
|
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
They are unit-tested using WAT. (see `tests/` directory)
|
||||||
|
WIP: Right now the `tests/` directory in not in the plugin itself. We aim to.
|
||||||
|
|
||||||
|
|
||||||
|
Features
|
||||||
|
========
|
||||||
|
|
||||||
|
A bunch of new References:
|
||||||
|
|
||||||
|
- `MajorityJudgmentGrade`
|
||||||
|
A single grade, like Excellent or To Reject.
|
||||||
|
This is a class in order to handle localization.
|
||||||
|
- `MajorityJudgmentGrading`
|
||||||
|
An ordered list of `MajorityJudgmentGrade`, from worst to best.
|
||||||
|
- `MajorityJudgmentPoll`
|
||||||
|
Has a title, grades and candidates.
|
||||||
|
- `MajorityJudgmentCandidate`
|
||||||
|
A candidate in a poll, receiving judgments.
|
||||||
|
- `MajorityJudgmentParticipant`
|
||||||
|
Government of the People, by the People, for the People.
|
||||||
|
- `MajorityJudgmentJudgment`
|
||||||
|
A grade given by a judge to a candidate.
|
||||||
|
- `MajorityJudgmentTallier`
|
||||||
|
The algorithm computing the poll tally (and the order of candidates)
|
||||||
|
The default algorithm will follow Balinsky & Laraki suggestions
|
||||||
|
https://doi.org/10.1287/opre.2014.1269
|
||||||
|
https://gargantua.polytechnique.fr/siatel-web/app/linkto/?objectId=DOCF002100000008000000000000095700000000
|
||||||
|
- `MajorityJudgmentPollTally`
|
||||||
|
Output of the tallier above. Ordered candidate tallies, winner first.
|
||||||
|
- `MajorityJudgmentCandidateTally`
|
||||||
|
Amounts of judgments per grade for a specific candidate.
|
||||||
|
|
||||||
|
They all are `class_name`d, so they are polluting the global namespace,
|
||||||
|
but their name should be unique enough, with the prefix `MajorityJudgment`.
|
||||||
|
|
||||||
|
If it causes you pain, you're welcome to open an issue to discuss about it.
|
||||||
|
|
||||||
|
|
||||||
|
MajorityJudgmentLinearResultsControl
|
||||||
|
------------------------------------
|
||||||
|
TODO
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
#func _enter_tree():
|
||||||
|
# add_custom_type("MajorityJudgmentLinearResultsControl", "Control", load("res://addons/majority_judgment/MajorityJudgmentLinearResultsControl.gd"), load("res://addons/majority_judgment/MajorityJudgmentLinearResultsControl.svg"))
|
||||||
|
|
||||||
|
|
||||||
|
#func _exit_tree():
|
||||||
|
# remove_custom_type("MajorityJudgmentLinearResultsControl")
|
||||||
|
|
Loading…
Reference in new issue