{ "info": { "author": "Hackathonners", "author_email": "contact@hackathonners.org", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "# Project Vania - A Fair Distributor\n**Fair Distributor** is a module which [fairly](#our-meaning-of-fairness) distributes a list of arbitrary **objects** through a set of **targets**.\n\nTo be more explicit, this module considers 3 key components:\n* **object**: some kind of entity that can be assigned to something.\n* **target**: the entity that will have one (or more) **objects** assigned to it.\n* **weight**: represents the cost of assigning a given **object** to a **target**.\n\nA collection of each of these components is given as input to the module.\nUsing linear programming, the **weights** of the **targets** relative to the **objects** are taken into consideration and used to build the constraints of an Integer Linear Programming (ILP) model. An ILP solver is then used, in order to distribute the **objects** through the **targets**, in the *fairest way possible*.\n\nFor instance, this module can be used to fairly distribute:\n* A set of tasks (objects) among a group of people (targets) according to their preferences to do each task (weights).\n* A set of projects (objects) among development teams (targets) according to their skill-level (weights) on the required skills for each project.\n\n\n## Our Meaning of Fairness\n\nWe define **Fairness** as:\n * The total **weight** of distributing all **objects** through the **targets** should be minimal.\nThis enforces that the least amount of shared effort is made.\n\n_Optionally_, the following rule can be applied (enabled by default):\n * The difference between the individual **weight** of each **target** is minimal.\nThis enforces the least amount of individual effort.\n\n## Documentation\n\nYou can find all the documentation in the following link:\nhttps://hackathonners.github.io/vania\n\n## Download and Install\n\nInstall the latest stable version of this module:\n\n $ pip install vania\n\nTo work with the source code, clone this repository:\n\n $ git clone git://github.com/hackathonners/vania.git\n\n## Usage\nTo start using the **Fair Distributor**, you need first to import it, by doing this:\n```python\nfrom vania.fair_distributor import FairDistributor\n```\nNow, just feed it with your problem variables, and ask for the solution.\nTo better explain how you can do it, lets consider a specific example.\n\nSuppose that you are managing a project, which contains **4** tasks: _Front-end Development_, _Back-end Development_, _Testing_, and _Documentation_.\nThere is a need to assign these **4** tasks through a set of **3** teams: _A_, _B_ and _C_.\nYou have the expected number of hours each team needs to finish each task:\n\n| |*Front-end Development*|*Back-end Development*|*Testing*|*Documentation*| \n|--------|-----------------------|----------------------|---------|---------------|\n|_Team A_| 1h | 2h | 3h | 2h |\n|_Team B_| 3h | 1h | 4h | 2h |\n|_Team C_| 3h | 4h | 1h | 1h |\n\nHere, we consider tasks as **objects**, teams as **targets** and the hours expressed in each cell are the **weights**.\n\nIt is necessary to create a data structure for each component. **Objects** and **targets** are lists, while **weights** is a collection, which contains for each target the cost of assigning every object to it, and is represented as a matrix.\nThe structures for this example would be as follow:\n\n```python\ntargets = ['Team A', 'Team B', 'Team C']\nobjects = ['Front-end Development', 'Back-end Development', 'Testing', 'Documentation']\nweights = [\n [1, 2, 3, 2],\t\t# hours for Team A to complete each task\n [3, 1, 4, 2],\t\t# hours for Team B to complete each task\n [3, 4, 1, 1]\t\t# hours for Team C to complete each task\n]\n```\n\nNow, just feed the **Fair Distributor** with all the components, and ask for the solution:\n```python\ndistributor = FairDistributor(targets, objects, weights)\nprint(distributor.distribute())\n```\n\nAnd here is the solution!\n```python\n# Output\n{\n 'Team A': ['Front-end Development'], # Team A does the Front-end Development\n 'Team C': ['Testing', 'Documentation'], # Team B does the Testing and Documentation\n 'Team B': ['Front-end Development']} # Team C does the Front-end Development\n}\n```\n\nHere is the final code of this example:\n```python\nfrom vania.fair_distributor import FairDistributor\n\ntargets = ['Team A', 'Team B', 'Team C']\nobjects = ['Front-end Development', 'Back-end Development', 'Testing', 'Documentation']\nweights = [\n [1, 2, 3, 2],\t\t# hours for Team A to complete each task\n [3, 1, 4, 2],\t\t# hours for Team B to complete each task\n [3, 4, 1, 1]\t\t# hours for Team C to complete each task\n]\n\ndistributor = FairDistributor(targets, objects, weights)\nprint(distributor.distribute())\n```\n\n## Contributions and Bugs\n\nFound a bug and wish to report it? You can do so here: https://github.com/Hackathonners/vania/issues.\nIf you'd rather contribute to this project with the bugfix, awesome! Simply Fork the project on Github and make a Pull Request.\n\nPlease tell us if you are unfamiliar with Git or Github and we'll definitely help you make your contribution.\n\n## Authors\n\nHackathonners is **_a group of people who build things_**.\n\nYou can check us out at http://hackathonners.org.\n\n## License\n\nThe Fair Distributor is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\nCopyright (C) 2017 Hackathonners\n\n\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/vania/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "vania", "package_url": "https://pypi.org/project/vania/", "platform": "", "project_url": "https://pypi.org/project/vania/", "project_urls": null, "release_url": "https://pypi.org/project/vania/0.2.0/", "requires_dist": [ "pdoc", "pulp" ], "requires_python": "", "summary": "A module to fairly distribute objects among targets considering weights.", "version": "0.2.0" }, "last_serial": 2807399, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "825380265ef2c8ca5bee6bf1e0adf47b", "sha256": "4896b6ee9303571e8e7bf4b67d86cc6c6d2203b8d26bf5356abf0d4ed0354ae8" }, "downloads": -1, "filename": "vania-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "825380265ef2c8ca5bee6bf1e0adf47b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6801, "upload_time": "2017-03-25T23:33:05", "url": "https://files.pythonhosted.org/packages/5e/bd/16a4cbf6d48ef71ababd68d420d56dc6d67a8227aeb3fb4bef0bd0456fa7/vania-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "305ec32f0f5b268699a24ad279b854ee", "sha256": "906e381c33416e779e7423dbf0d6f0c9088cfe65a61870614f9521fbe53b8e42" }, "downloads": -1, "filename": "vania-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "305ec32f0f5b268699a24ad279b854ee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6801, "upload_time": "2017-03-25T23:46:26", "url": "https://files.pythonhosted.org/packages/47/3a/e826166d6825367694c11c924bf163369b34b266fa316abb12ee02354418/vania-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45f27d83e9b2371a49ee8f48f5b91181", "sha256": "218799968755e827e42a626fc4ffc27d0e12b233e4dd6c743e4cecb6f062ef80" }, "downloads": -1, "filename": "vania-0.1.1.tar.gz", "has_sig": false, "md5_digest": "45f27d83e9b2371a49ee8f48f5b91181", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4148, "upload_time": "2017-03-25T23:46:27", "url": "https://files.pythonhosted.org/packages/1b/e8/463eea6f9907ad497ce7afc9e4e5968419cd542fc193d43fbf54315e0136/vania-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "9038b0922d7b07025f5d11e25c2ab680", "sha256": "f7cb5c8a16420cbdedaac2b578bab379451b0cafee7e7fb5478eadd0454506dd" }, "downloads": -1, "filename": "vania-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9038b0922d7b07025f5d11e25c2ab680", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11354, "upload_time": "2017-04-16T22:29:17", "url": "https://files.pythonhosted.org/packages/b9/07/4585f97e41a540e25bbcea5246bff99171439e6be948bba5c7a17368731d/vania-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c39a6dafcc920baadd976d58507db90c", "sha256": "6f6dd1da50cfaac731723f1dae0f333daa5bb8c16fdd21cf4a05b5ba0e0667bd" }, "downloads": -1, "filename": "vania-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c39a6dafcc920baadd976d58507db90c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5525, "upload_time": "2017-04-16T22:29:18", "url": "https://files.pythonhosted.org/packages/86/52/00a64a80db17e07af2dad6ff3dffa4e52ff6a6a8e5838694a11d96949358/vania-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9038b0922d7b07025f5d11e25c2ab680", "sha256": "f7cb5c8a16420cbdedaac2b578bab379451b0cafee7e7fb5478eadd0454506dd" }, "downloads": -1, "filename": "vania-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9038b0922d7b07025f5d11e25c2ab680", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11354, "upload_time": "2017-04-16T22:29:17", "url": "https://files.pythonhosted.org/packages/b9/07/4585f97e41a540e25bbcea5246bff99171439e6be948bba5c7a17368731d/vania-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c39a6dafcc920baadd976d58507db90c", "sha256": "6f6dd1da50cfaac731723f1dae0f333daa5bb8c16fdd21cf4a05b5ba0e0667bd" }, "downloads": -1, "filename": "vania-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c39a6dafcc920baadd976d58507db90c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5525, "upload_time": "2017-04-16T22:29:18", "url": "https://files.pythonhosted.org/packages/86/52/00a64a80db17e07af2dad6ff3dffa4e52ff6a6a8e5838694a11d96949358/vania-0.2.0.tar.gz" } ] }