Revise README

Updated README to improve clarity and add usage details.
This commit is contained in:
Thomas (Tom) C. Gorordo 2026-05-25 22:25:52 -07:00 committed by GitHub
parent 18405644d3
commit d1db77c466
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ Pairwise majority comparisons scale quadratically in the number of candidates an
in the number of ballots, while the SCC and condensation graph analysis is in the number of ballots, while the SCC and condensation graph analysis is
approximately quadratic in the number of candidates for the dense tournament graphs typical approximately quadratic in the number of candidates for the dense tournament graphs typical
of Condorcet elections. Internally, repeated ballots are compressed/cache-counted before of Condorcet elections. Internally, repeated ballots are compressed/cache-counted before
pairwise evaluation to improve performance over duplicate rankings. pairwise evaluation to improve performance over duplicate rankings.
This is all overkill for small elections, but is fun. This is all overkill for small elections, but is fun.
@ -33,7 +33,22 @@ executable should give you access to the `smithycmd` CLI command.
this in your shell as `uv run src/smithycmd.py [...]` from within the repo after cloning it locally. this in your shell as `uv run src/smithycmd.py [...]` from within the repo after cloning it locally.
In either case, the command expects the same argument structure: In either case, the command expects the same argument structure:
TODO ```bash
$ uv run src/smithycmd.py --help
Usage: smithycmd.py [OPTIONS] BALLOTS
Compute the Smith set from a box of ranked-choice ballots -- .csv or
.xls(x).
The Smith set is the minimal set of candidates which can beat all others
pairwise (simple ranking majority) - if there is a single winner in the set,
they are guaranteed the Condorcet i.e. Majority winner.
Options:
-b, --show-ballots Show relevant ballots (after selections).
-p, --pretty Pretty-print output.
--help Show this message and exit.
```
If you want a 'None' option in your election, it should be included as a candidate. If you want a 'None' option in your election, it should be included as a candidate.
@ -49,9 +64,9 @@ hosts a [CGI form](https://service.uoregon.edu/TDClient/2030/Portal/KB/ArticleDe
which accepts a `.csv` or `.xls`(`x`) upload of a ballot-box and responds with the resulting which accepts a `.csv` or `.xls`(`x`) upload of a ballot-box and responds with the resulting
Smith set. The application can typically handle ~100s of candidates and ~10ks of votes Smith set. The application can typically handle ~100s of candidates and ~10ks of votes
before running into hosting resource limitations and timing out. before running into hosting resource limitations and timing out.
No ballot data is retained on the server after execution. No ballot data is retained on the server after execution.
### Python Package ### Python Package
The `smithy` python package primarily provides the function `smith_set(ballot_box_df)` The `smithy` python package primarily provides the function `smith_set(ballot_box_df)`