1# tof-voters
2
3This tool is used for determining who is qualified for voting in a TOF election,
4based on the
5[requirements](https://github.com/openbmc/docs/blob/master/tof/membership-and-voting.md#metrics)
6set out by the TOF.
7
8The tool will query Gerrit for commits and reviews, process them, and generate a
9report of qualified individuals.
10
11The typical use of the tool is something like this:
12
13```sh
14./voters dump-gerrit --after=2021-06-30
15./voters analyze-commits --before "2022-01-01" --after "2021-06-30"
16./voters analyze-reviews --before "2022-01-01" --after "2021-06-30"
17./voters report
18jq '[ .[] | select(.qualified) | {(.name): .points} ] | add | to_entries | sort_by(.value) | reverse | from_entries' data/report.json
19```
20
21The above will yield a JSON dictionary of "users:points" where 'qualified' is
22set in the users' dictionary from `report.json` like:
23
24```json
25{
26    "User Name 2": 19,
27    "User Name 1": 16,
28    ...
29}
30```
31