Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document one example carefully #2

Open
dfrankow opened this issue Feb 10, 2021 · 2 comments
Open

Document one example carefully #2

dfrankow opened this issue Feb 10, 2021 · 2 comments

Comments

@dfrankow
Copy link

This is a feature request.

The code in the "sims" subdirectory looks daunting. It has many files, I'd have to read a lot of stuff. I'm just trying to figure out if I want to use this library to compute common concepts in Condorcet voting: Condorcet winner, Smith set, Copeland algorithm, etc. I'm not yet sure if it has that stuff.

Picking one example, and writing a brief narration would be very helpful in letting me understand what exactly this library does.

@johnh865
Copy link
Owner

johnh865 commented Feb 10, 2021

dfrankow, Unfortunately I don't think you will get everything you want here, and the documentation is not particularly good right now, but some stuff (for example smith set) is computed in a file at

https://github.com/johnh865/election_sim/blob/master/votesim/votemethods/condcalcs.py

I also don't have Copeland implemented yet.

I recommend you look at the votesim/votemethods subpackage for voting method implementation while I slowly add useable docs. Most of the functions have numpy-style documentation strings written in them, and all voting methods have the same function input parameters.

To use this package as a voting method implementation, there is a "master class" that handles all the voting methods at votesim.votemethods.eRunner. Keep in mind that this thing was written as a simulator, not something with a easy to use human interface.

For examples, most of the voting methods have tests in votesim/votemethods/tests

I will slowly add in the requested features. Thanks for your interest in the package!

@dfrankow
Copy link
Author

I appreciate your thoughtful response.

I will continue to look around for a simple library with an API. I am surprised there isn't one after all this time (Llull invented some version 1299!), but I haven't found it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants