{ "info": { "author": "Iacopo Garizio", "author_email": "info@iacopogarizio.com", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg\n :target: https://github.com/igarizio/py-school-match/blob/master/LICENSE\n\n===================\n**Py-school-match**\n===================\n\n\n**Py-school-match** is an open-source Python package that implements multiple matching algorithms in order to assign\nstudents to schools.\n\nIt provides multiple algorithms ready to use:\n\n- Top Trading Cycles (TTC)\n- Deferred acceptance with multiple tie-breaking (DAMTB)\n- Deferred acceptance with single tie-breaking (DASTB)\n- Stable improvement cycles (SIC)\n- Deferred Acceptance with multiple tie-breaking, plus stable cycles (MSIC)\n- Deferred Acceptance with single tie-breaking, plus non-stable cycles (NSIC)\n\n**Py-school-match** is designed specifically for the student-to-school assignation problem. Because of this,\nyou can focus on evaluating different settings and algorithms, without the need to adapt or develop a\ncomplete solution.\n\nSample code\n===========\n\n.. code-block:: python\n\n import py_school_match as psm\n\n # Creating three students.\n st0 = psm.Student()\n st1 = psm.Student()\n st2 = psm.Student()\n\n # Creating a criteria. This means 'vulnerable' is now a boolean.\n vulnerable = psm.Criteria('vulnerable', bool)\n\n # Assigning st1 as vulnerable\n student_vulnerable = psm.Characteristic(vulnerable, True)\n st1.add_characteristic(student_vulnerable)\n\n # Creating three schools, each with one seat available.\n sc0 = psm.School(1)\n sc1 = psm.School(1)\n sc2 = psm.School(1)\n\n # Defining preferences (from most desired to least desired)\n st0.preferences = [sc0, sc1, sc2]\n st1.preferences = [sc0, sc2, sc1]\n st2.preferences = [sc2, sc1, sc0]\n\n # Creating a lists with the students and schools defined above.\n schools = [sc0, sc1, sc2]\n students = [st0, st1, st2]\n\n # Defining a ruleset\n ruleset = psm.RuleSet()\n\n # Defining a new rule from the criteria above.\n rule_vulnerable = psm.Rule(vulnerable)\n\n # Adding the rule to the ruleset. This means that a 'vulnerable' student has a higher priority.\n # Note that rules are added in order (from higher priority to lower priority)\n ruleset.add_rule(rule_vulnerable)\n\n # Creating a social planner using the objects above.\n planner = psm.SocialPlanner(students, schools, ruleset)\n\n # Selecting an algorithm\n algorithm = psm.SIC()\n\n # Running the algorithm.\n planner.run_matching(algorithm)\n\n # inspecting the obtained assignation\n for student in students:\n print(\"Student {} was assigned to School {}\".format(student.id, student.assigned_school.id))\n\n\n\nInstallation\n============\n\nDependencies\n------------\n\n* graph-tool (>= 2.27)\n\nUser installation\n-----------------\n\n.. code-block:: shell\n\n pip install py-school-match\n\nOr you can clone the repo and install it:\n\n.. code-block:: shell\n\n git clone https://github.com/igarizio/py-school-match\n cd py-school-match\n python setup.py install\n\nRemember to first install `graph-tool `_.\n\nDevelopment\n-----------\n\n| Contributions are more than welcome. Feel free to open an issue or contact me!\n| Remember that this package does not provide ANY WARRANTY OF ANY KIND.\n\nHow to cite?\n============\n\nInsert citation here.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/igarizio/py-school-match", "keywords": "", "license": "GLP v3", "maintainer": "", "maintainer_email": "", "name": "py-school-match", "package_url": "https://pypi.org/project/py-school-match/", "platform": "", "project_url": "https://pypi.org/project/py-school-match/", "project_urls": { "Homepage": "https://github.com/igarizio/py-school-match" }, "release_url": "https://pypi.org/project/py-school-match/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Py-school-match, a Python package that implements matching algorithms for the student-to-school assignation problem.", "version": "0.2.0" }, "last_serial": 4536644, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "0b69b468c82a57cf12bd2d43a14bf184", "sha256": "e6785c4b85ca5e01a781ceda2738fa00d45e3503f0158b37dd7e730bc2f44cd1" }, "downloads": -1, "filename": "py_school_match-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "0b69b468c82a57cf12bd2d43a14bf184", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 28461, "upload_time": "2018-11-28T02:04:00", "url": "https://files.pythonhosted.org/packages/c7/45/bb344f9ff722a265ee4fc3bac394a8cf243d16a0eae5ec8afec1676f42d5/py_school_match-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "12ba9bd30b1ef3e09fd0e08822854e48", "sha256": "53afb5d04a2b6114dffc01d5cefc7a3a7059c25ba7b76a2fe22e54c60b40b2da" }, "downloads": -1, "filename": "py-school-match-0.2.0.tar.gz", "has_sig": false, "md5_digest": "12ba9bd30b1ef3e09fd0e08822854e48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15269, "upload_time": "2018-11-28T02:04:03", "url": "https://files.pythonhosted.org/packages/19/a9/341964233bc40046b5010b60daf8032d922c93da55b7722318d04cf90972/py-school-match-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b69b468c82a57cf12bd2d43a14bf184", "sha256": "e6785c4b85ca5e01a781ceda2738fa00d45e3503f0158b37dd7e730bc2f44cd1" }, "downloads": -1, "filename": "py_school_match-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "0b69b468c82a57cf12bd2d43a14bf184", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 28461, "upload_time": "2018-11-28T02:04:00", "url": "https://files.pythonhosted.org/packages/c7/45/bb344f9ff722a265ee4fc3bac394a8cf243d16a0eae5ec8afec1676f42d5/py_school_match-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "12ba9bd30b1ef3e09fd0e08822854e48", "sha256": "53afb5d04a2b6114dffc01d5cefc7a3a7059c25ba7b76a2fe22e54c60b40b2da" }, "downloads": -1, "filename": "py-school-match-0.2.0.tar.gz", "has_sig": false, "md5_digest": "12ba9bd30b1ef3e09fd0e08822854e48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15269, "upload_time": "2018-11-28T02:04:03", "url": "https://files.pythonhosted.org/packages/19/a9/341964233bc40046b5010b60daf8032d922c93da55b7722318d04cf90972/py-school-match-0.2.0.tar.gz" } ] }