> On Mar 27, 2015, at 10:25 PM, Alan D. Cabrera <l...@toolazydogs.com> wrote: > > >> On Mar 24, 2015, at 7:07 PM, Daniel Gruno <humbed...@apache.org> wrote: >> >> Right, so I went a bit on a rampage, so we now have: >> - Single Transferable Vote >> - Yes/No/Abstain >> - D'Hont / Jefferson voting >> - Multiple Non-Transferable Votes (Plurality-at-large) >> - First Past the Post (whoever gets most votes wins, Prez elections etc) >> >> all with setup, editing, voting, tallying in working condition. > > Pretty cool. > > Is this really a plugin architecture? If so, can you provide some details?
Ok, I just finished scanning the code. You may want to consider Python entry points as a basis for the plugins framework. http://pylons-webframework.readthedocs.org/en/latest/advanced_pylons/entry_points_and_plugins.html >> On 2015-03-24 23:00, Daniel Gruno wrote: >>> I thought I'd write a note on what I am currently working on in pysteve, >>> which is turning each vote type into a module/plugin. >>> This is not a complete API yet, but if you look at the libs/plugins dir, >>> you should get the gist of what I'm trying to do; making validation and >>> tallying a function native to the plugins instead of trying to pull >>> everything into election.py. This way we can add new vote types as we see >>> fit, and people can enable/disable what they want to use. >>> >>> There is still some work left, as different vote types have different data >>> fields associated with them, and I expect to be able to address that in the >>> coming days. This will likely mean breaking the previously established JSON >>> structure a bit. >>> >>> I've also added the D'Hondt (Jefferson) based voting system to the list of >>> supported votes types, and I plan to add more vote types as the days go by. >>> >>> WIth regards, >>> Daniel. >> >