Skip to content

Commit

Permalink
Merge pull request #214 from afshin/election-script
Browse files Browse the repository at this point in the history
Update election docs to link to STeVe script
  • Loading branch information
blink1073 authored Mar 29, 2024
2 parents a73bf29 + 8c08ddc commit 138db0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ target/

# Docs
_build

# macOS
.DS_Store
4 changes: 2 additions & 2 deletions elections/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The script in this directory converts a comma-separated value (CSV) file
from a Jupyter Executive Council election into an `.ini` file and a `.txt`
file for use with the Apache STeVe script `stv_tool.py`. After running
file for use with the Apache STeVe script `stv_tool.py`. After running
this latter script, which is stored in the
[apache/steve project](https://github.com/apache/steve), you will determine
which candidates have won.
Expand Down Expand Up @@ -82,7 +82,7 @@ slate would have their vote represented as `abc`.
From the directory where you have `votes.csv`, run `process-votes.py`.

This script produces `board_nominations.ini` and `votedata.txt` for use
with the Apache STeVe tabulation script. Run this script, passing the
with the [Apache STeVe tabulation script (`stv_tool.py`)](https://github.com/apache/steve/blob/trunk/monitoring/stv_tool.py). Run this script, passing the
number of seats to elect with the `-s` parameter. In the example below,
the tabulation script will select two winners. You can get more verbose
output using the `-v` parameter.
Expand Down
4 changes: 2 additions & 2 deletions elections/process-votes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
candidate_alphas = [' '] * len(candidate_priorities)

for idx, c in enumerate(candidate_priorities):
if (re.search('\d', c)):
if (re.search(r'\d', c)):
candidate_alphas[int(c) - 1] = letters[idx]

# This is normally to dedupe multiple votes by the same voter,
# but Google Forms already does that, so we instead assume that
# every vote is unique and cast at the current time
Expand Down

0 comments on commit 138db0e

Please sign in to comment.