{ "info": { "author": "Duncan McGreggor", "author_email": "oubiwann@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python" ], "description": "~~~~~~~~~\nballotbox\n~~~~~~~~~\n\n.. contents::\n :depth: 1\n\n\n============\nIntroduction\n============\n\nAbout ballotbox\n---------------\n\nballotbox is a Python library that attempts to implement useful voting\nmethodologies.\n\nThis project started as a result of conversations and experimentation that took\nplace on the ULS-SIG when discussing self-organizing object meshes.\n\nDependencies\n------------\n\nThe current implementation depends upon the following additional software\nand/or libraries:\n\n * Python\n\n * zope.interface\n\n * sphinx\n\n * repoze.sphinx.autointerface\n\n\nAdditional Information\n----------------------\n\nFor information on the following, please see the sections (or, if reading\nthis file in a working directory, the ./docs subdir):\n\n * Installation\n\n * Usage\n\n\n\n============\nInstallation\n============\n\nDevelopment\n-----------\n\nIf you want to develop for ballotbox or use the latest code we're working on,\nyou can install from the sources. You'll need bzr installed, and then just do\nthe following::\n\n $ bzr branch lp:ballotbox\n $ cd ballotbox\n $ sudo python setup.py install\n\n\nEasy Install\n------------\n\nYou can use the setuptools easy_install script to get ballotbox on your\nsystem::\n\n $ sudo easy_install ballotbox\n\n\nManual Download\n---------------\n\nYou can manually download the source tarball from the Python Package Index by\nvisiting the following URL:\n\n http://pypi.python.org/pypi/ballotbox\n\nYou'll need to untar and gunzip the source, cd into the source directory, and\nthen you can do the usual::\n\n $ sudo python setup.py install\n\n\nChecking the Source\n-------------------\n\nOnce installed, as long as you have Twisted installed on your system and the\ntrial script in your PATH, you can test the source code by executing this\nanywhere::\n\n $ trial ballotbox\n\nThat will run the test suite and report on the success and failure of any unit\ntests.\n\n\n=====\nUsage\n=====\n\nBelow is a quick introduction to the usage of the API. The voting method used\nin this example is simple majority. Simple majority rule voting is mostly\nuseful for binary decisions. Here are some examples involving just two\nchoices::\n\n >>> from ballotbox.ballot import BallotBox\n >>> from ballotbox.singlewinner.simple import MajorityRuleVoting\n\n >>> bb = BallotBox(method=MajorityRuleVoting)\n >>> bb.batch_votes([(\"alice\", 10000), (\"bob\", 5000)])\n >>> bb.get_winner()\n [(10000, 'alice')]\n\n >>> bb = BallotBox(method=MajorityRuleVoting)\n >>> bb.batch_votes([(\"bob\", 5000), (\"carol\", 5001)])\n >>> bb.get_winner()\n [(5001, 'carol')]\n\nThis method breaks down with ties and is not guaranteed to work with more than\ntwo choices::\n\n >>> bb = BallotBox(method=MajorityRuleVoting)\n >>> bb.batch_votes([(\"alice\", 8000), (\"carol\", 8000)])\n >>> bb.get_winner()\n []\n\nNo result is returned. Likewise for edge cases with more than two candidates::\n\n >>> bb = BallotBox(method=MajorityRuleVoting)\n >>> bb.batch_votes([(\"alice\", 5000), (\"bob\", 4000), (\"carol\", 3000)])\n >>> bb.get_winner()\n []\n\n\n\n====\nTODO\n====\n\nImplementation\n--------------\n\n[DONE] Convert the criteria classes to use interfaces. Then, instead of\nsubclassing these in the voting methods, they would implement them. This will\nmake zope.interface a dependency.\n\n[DONE] Copy multi-doctest file test suite code from txULS/soom to here.\n\n[DONE] Add a new docs/methods directory and a file for each voting method.\n\n[IN PROGRESS] Finish implementing the single-winner voting methods.\n\nImplement the Multi-winner voting methods.\n\nImplement the proxy and random voting methods.\n\nDo research on distance-based voting:\n\n * in particular, defining a metric space for candidates based on a set of\n preferences\n\n * then taking the square root of the sum of the squares, getting the\n n-dimensional distance \n\nTesting\n-------\n\n[IN PROGRESS] Add doctests for each voting method.\n\nAdd a make target that tests the source dist:\n\n * create a temp dir\n\n * untar the dist there\n\n * run the unit tests and doctests against that directory\n\nDocumentation\n-------------\n\n * Change uppercase doc files to lower case (with the exceptions of the\n standard ones like README, TODO, etc.) \n\n * Updated the sphinx configuration file to use ballotbox.meta\n\n * Add sidebar links in the generated docs\n\n * Autogenerate ReST files for API docs\n\n * the logic that drives this should go in ballotbox.util.docs\n\n * add a make target that imports and calls the appropriate functions to\n generate the API docs\n\n\n=======\nChanges\n=======\n\nVersion 0.1\n-------------\n\n* Initial release of ballotbox.", "description_content_type": null, "docs_url": "https://pythonhosted.org/ballotbox/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://launchpad.net/ballotbox", "keywords": null, "license": "LGPLv3", "maintainer": null, "maintainer_email": null, "name": "ballotbox", "package_url": "https://pypi.org/project/ballotbox/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ballotbox/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://launchpad.net/ballotbox" }, "release_url": "https://pypi.org/project/ballotbox/0.1/", "requires_dist": null, "requires_python": null, "summary": "A Python library for voting algorithms.", "version": "0.1" }, "last_serial": 786689, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "99fb47891f0e64dd0f5336ef0c742b2b", "sha256": "6efa54b7b6d67dea9b2637d34a145ef164777524edac21b3aa6f509087586e3f" }, "downloads": -1, "filename": "ballotbox-0.1.tar.gz", "has_sig": false, "md5_digest": "99fb47891f0e64dd0f5336ef0c742b2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42512, "upload_time": "2011-07-17T19:50:58", "url": "https://files.pythonhosted.org/packages/e3/1a/430831f2c991f26d76eb4d4780eb23a82735cce4a6572d96db52ec8979db/ballotbox-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99fb47891f0e64dd0f5336ef0c742b2b", "sha256": "6efa54b7b6d67dea9b2637d34a145ef164777524edac21b3aa6f509087586e3f" }, "downloads": -1, "filename": "ballotbox-0.1.tar.gz", "has_sig": false, "md5_digest": "99fb47891f0e64dd0f5336ef0c742b2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42512, "upload_time": "2011-07-17T19:50:58", "url": "https://files.pythonhosted.org/packages/e3/1a/430831f2c991f26d76eb4d4780eb23a82735cce4a6572d96db52ec8979db/ballotbox-0.1.tar.gz" } ] }