{ "info": { "author": "My Username", "author_email": "myusername@example.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3", "Topic :: Games/Entertainment :: Puzzle Games" ], "description": "advent-of-code-sample:\n----------------------\n\nProvides a working example plugin structure for using the `aoc` runner script provided by [advent-of-code-data](https://github.com/wimglenn/advent-of-code-data).\n\nThe `aoc` runner allows you to easily verify your [Advent of Code](https://adventofcode.com/) solutions against multiple datasets, or verify other user's code against your own dataset.\n\n```bash\n$ cat ~/.config/aocd/tokens.json # create this file with some auth tokens\n{\n \"github\": \"53616c7465645f5f0775...\",\n \"google\": \"53616c7465645f5f7238...\",\n \"reddit\": \"53616c7465645f5ff7c8...\",\n \"twitter\": \"53616c7465645f5fa524...\"\n}\n$ pip install ~/src/advent-of-code-sample # install the directory which contains your setup.py file\n...\n$ pip install -q advent-of-code-wim # can also install some other user's code if you want..?\n...\n$ aoc --years 2015 --days 3 4 11 # run it!\n 0.25s 2015/3 - Perfectly Spherical Houses in a Vacuum wim/github \u2714 part a: 2565 \u2714 part b: 2639\n 0.11s 2015/3 - Perfectly Spherical Houses in a Vacuum wim/google \u2714 part a: 2592 \u2714 part b: 2360\n 0.12s 2015/3 - Perfectly Spherical Houses in a Vacuum wim/reddit \u2714 part a: 2592 \u2714 part b: 2360\n 0.12s 2015/3 - Perfectly Spherical Houses in a Vacuum wim/twitter \u2714 part a: 2565 \u2714 part b: 2639\n 0.12s 2015/3 - Perfectly Spherical Houses in a Vacuum myusername/github \u2716 part a: 1234 (expected: 2565) \u2716 part b: 5678 (expected: 2639)\n 0.12s 2015/3 - Perfectly Spherical Houses in a Vacuum myusername/google \u2716 part a: 1234 (expected: 2592) \u2716 part b: 5678 (expected: 2360)\n 0.11s 2015/3 - Perfectly Spherical Houses in a Vacuum myusername/reddit \u2716 part a: 1234 (expected: 2592) \u2716 part b: 5678 (expected: 2360)\n 0.11s 2015/3 - Perfectly Spherical Houses in a Vacuum myusername/twitter \u2716 part a: 1234 (expected: 2565) \u2716 part b: 5678 (expected: 2639)\n 9.04s 2015/4 - The Ideal Stocking Stuffer wim/github \u2714 part a: 254575 \u2714 part b: 1038736\n 25.43s 2015/4 - The Ideal Stocking Stuffer wim/google \u2714 part a: 117946 \u2714 part b: 3938038\n 12.20s 2015/4 - The Ideal Stocking Stuffer wim/reddit \u2714 part a: 254575 \u2714 part b: 1038736\n 47.67s 2015/4 - The Ideal Stocking Stuffer wim/twitter \u2714 part a: 282749 \u2714 part b: 9962624\n 0.12s 2015/4 - The Ideal Stocking Stuffer myusername/github \u2716 part a: 1234 (expected: 254575) \u2716 part b: 5678 (expected: 1038736)\n 0.12s 2015/4 - The Ideal Stocking Stuffer myusername/google \u2716 part a: 1234 (expected: 117946) \u2716 part b: 5678 (expected: 3938038)\n 0.12s 2015/4 - The Ideal Stocking Stuffer myusername/reddit \u2716 part a: 1234 (expected: 254575) \u2716 part b: 5678 (expected: 1038736)\n 0.12s 2015/4 - The Ideal Stocking Stuffer myusername/twitter \u2716 part a: 1234 (expected: 282749) \u2716 part b: 5678 (expected: 9962624)\n 6.17s 2015/11 - Corporate Policy wim/github \u2714 part a: vzbxxyzz \u2714 part b: vzcaabcc\n 6.26s 2015/11 - Corporate Policy wim/google \u2714 part a: cqjxxyzz \u2714 part b: cqkaabcc\n 4.69s 2015/11 - Corporate Policy wim/reddit \u2714 part a: hxbxxyzz \u2714 part b: hxcaabcc\n 5.75s 2015/11 - Corporate Policy wim/twitter \u2714 part a: hxbxxyzz \u2714 part b: hxcaabcc\n 0.11s 2015/11 - Corporate Policy myusername/github \u2716 part a: 1234 (expected: vzbxxyzz) \u2716 part b: 5678 (expected: vzcaabcc)\n 0.12s 2015/11 - Corporate Policy myusername/google \u2716 part a: 1234 (expected: cqjxxyzz) \u2716 part b: 5678 (expected: cqkaabcc)\n 0.11s 2015/11 - Corporate Policy myusername/reddit \u2716 part a: 1234 (expected: hxbxxyzz) \u2716 part b: 5678 (expected: hxcaabcc)\n 0.12s 2015/11 - Corporate Policy myusername/twitter \u2716 part a: 1234 (expected: hxbxxyzz) \u2716 part b: 5678 (expected: hxcaabcc)\n```\n\nHow to hook into your code:\n---------------------------\n\nThe `aoc` runner uses setuptools' [dynamic discovery of services and plugins](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins) feature to locate and run your code.\nDefine your plugin's entry point in `setup.py`. The group name to use is \"adventofcode.user\":\n\n```python\n# setup.py\nfrom setuptools import setup\n\nsetup(\n ...\n entry_points={\"adventofcode.user\": [\"myusername = mypackage:mysolve\"]},\n)\n```\n\nChange `mypackage` to whatever package or module name is used to import your stuff.\nThe name `mysolve` should resolve to a callable in your package's namespace which accepts three named arguments `year`, `day`, `data` (any order ok) and returns two values, e.g.:\n\n```python\ndef mysolve(year, day, data):\n ...\n return part_a_answer, part_b_answer\n```\n\nInside the entry-point you can do whatever you need in order to delegate to your code. For example, write out data to a scratch file then run a script, or import a function and just pass in the data directly as an argument.\nThe only requirement is that this entry-point should return a tuple of two values, with the answers for that day's puzzle, the rest is up to you.\nYou could fork this repo and edit it, or just write your own plugin manually.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/myusername/advent-of-code-myusername", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "advent-of-code-sample", "package_url": "https://pypi.org/project/advent-of-code-sample/", "platform": "", "project_url": "https://pypi.org/project/advent-of-code-sample/", "project_urls": { "Homepage": "https://github.com/myusername/advent-of-code-myusername" }, "release_url": "https://pypi.org/project/advent-of-code-sample/0.1/", "requires_dist": [ "advent-of-code-data (>=0.8.0)" ], "requires_python": "", "summary": "myusername's solutions for https://adventofcode.com/", "version": "0.1" }, "last_serial": 4773324, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fc7ea8cfdc3e54c93a4556b51e17aeb8", "sha256": "cf0fd2642c47058e362bb6fdce3a84f812b9e83ce91bb9842c48a8474a7add68" }, "downloads": -1, "filename": "advent_of_code_sample-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fc7ea8cfdc3e54c93a4556b51e17aeb8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4980, "upload_time": "2019-02-02T22:33:26", "url": "https://files.pythonhosted.org/packages/6b/ad/63afa3eb7b5b2ad4fbe4ea20c591b4694b9e616583f05cd6d00d52215069/advent_of_code_sample-0.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc7ea8cfdc3e54c93a4556b51e17aeb8", "sha256": "cf0fd2642c47058e362bb6fdce3a84f812b9e83ce91bb9842c48a8474a7add68" }, "downloads": -1, "filename": "advent_of_code_sample-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fc7ea8cfdc3e54c93a4556b51e17aeb8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4980, "upload_time": "2019-02-02T22:33:26", "url": "https://files.pythonhosted.org/packages/6b/ad/63afa3eb7b5b2ad4fbe4ea20c591b4694b9e616583f05cd6d00d52215069/advent_of_code_sample-0.1-py2.py3-none-any.whl" } ] }