{ "info": { "author": "F\u00e1bio Mac\u00eado Mendes", "author_email": "fabimacedomendes@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Software Development :: Libraries" ], "description": "Funspec\n=======\n\nFunspec is an specification for grading programming questions based on the\nbehavior of functions rather than the simple evaluation of a program IO. This\nmodule was created in the context of an online judge to be used in programming\nclasses. Funspec is built on top of `Funspec`__ and tries to be as language\nagnostic as possible.\n\n.. _Funspec: https://github.com/fabiommendes/funspec/\n\nIn funspec, we define the functions that will be used as the answer key to\nproduce the correct input/output pairs using the @answer_key decorator::\n\n @answer_key\n def double(x: int) -> int:\n return x + x\n\nOne can specify generic input values using type hints. In the above example,\nthe funspec tester will create a series of integer examples for ``x`` and\ncompare will the results from the ``double`` function defined by the student\nwith the results produced by the answer key. The student code can be written\nin Python or in any other language that support the input/output values (since\nthis function uses only integers, we don't expect problems with any mainstream\nlanguage).\n\nOften, a simple type specification can be too broad: the test function should\nhandle just a subset of the integers, or maybe only strings of some specific\ntype. In many cases, these extra restrictions can be easily represented by\nIospec commands, which funspec gladly accepts::\n\n @answer_key\n def double(x: '$int(0, 1000)') -> int:\n return x + x\n\nNow the function will be tested only with random integers in the 0-1000\ninterval.\n\nRunning code\n------------\n\nTo run the tests and collect results, use::\n\n from funspec import run_tests\n\n source = '...' # The input source code\n funspec = '...' # Source code for the funspec module\n result = run_tests(source, funspec, lang='python')\n if result.is_correct():\n print('Congratulations!')\n\n\nMulti-langauge support\n----------------------\n\nAt the current stage of development, Funspec only evaluates Python code (the\nmodule definition is always in Python, but we expect to support other\nlanguages for student code submitted for evaluation).\n\nWe plan to implement support for C in the future and we welcome contributions\nfor any other language. Unfortunately, the developers do not have time to\nto implement support to every programming language. Rather, we just concentrate\non those few languages that we actively use and care about.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "Funspec", "package_url": "https://pypi.org/project/Funspec/", "platform": "any", "project_url": "https://pypi.org/project/Funspec/", "project_urls": null, "release_url": "https://pypi.org/project/Funspec/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A short description for your project.", "version": "0.1.0" }, "last_serial": 2711121, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0d7550000baf4d5e4ace8d99da99d825", "sha256": "5791ec592bf4d19fa417fa5852882d4e7f45201b40f4f1b488cd81a194750585" }, "downloads": -1, "filename": "Funspec-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d7550000baf4d5e4ace8d99da99d825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11530, "upload_time": "2017-03-16T20:28:05", "url": "https://files.pythonhosted.org/packages/41/08/b43b1fdc3de68cfba3747d6fbd56d645987302be6f909ab40fb25eefb0de/Funspec-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d7550000baf4d5e4ace8d99da99d825", "sha256": "5791ec592bf4d19fa417fa5852882d4e7f45201b40f4f1b488cd81a194750585" }, "downloads": -1, "filename": "Funspec-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d7550000baf4d5e4ace8d99da99d825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11530, "upload_time": "2017-03-16T20:28:05", "url": "https://files.pythonhosted.org/packages/41/08/b43b1fdc3de68cfba3747d6fbd56d645987302be6f909ab40fb25eefb0de/Funspec-0.1.0.tar.gz" } ] }