{ "info": { "author": "Geoffrey M. Poore", "author_email": "gpoore@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Education", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Education", "Topic :: Education :: Testing" ], "description": "======================================================\n``RandAssign``: Randomized assignments with PythonTeX\n======================================================\n\n:Author: Geoffrey M. Poore\n:License: `BSD 3-Clause `_\n\nCreate randomized assignments with solutions/keys using Python and LaTeX.\n\n\n.. contents::\n\n\nInstallation\n------------\n\nPython 2.7 and 3.2+ are officially supported.\n\nFor the latest version, download the source from GitHub_, then run::\n\n python setup.py install\n\nThe package is also available on PyPI_ (the Python Package Index). Install\nvia::\n\n pip install randassign\n\nOr use::\n\n easy_install randassign\n\nRequires the PythonTeX_ package for LaTeX. PythonTeX is part of the full\n`TeX Live`_ installation; it may also be installed via the TeX Live package\nmanager, or using the Python installation script that is bundled with PythonTeX\n(this supports MiKTeX).\n\n .. _PythonTeX: https://github.com/gpoore/pythontex\n\n.. _GitHub: https://github.com/gpoore/randassign\n\n.. _PyPI: https://pypi.python.org/pypi\n\n.. _TeX Live: https://www.tug.org/texlive/\n\nStandard usage\n--------------\n\nThe steps to create a typical randomized assignment are listed below. Or\nconsult the available `complete examples`_.\n\n.. _complete examples: https://github.com/gpoore/randassign/tree/master/doc\n\n* Create a LaTeX document, with ``\\usepackage{pythontex}``. Have this file\n ``\\input`` a file ``name.tex`` that contains a placeholder name for the\n person who will take the assignment. Also ``\\input`` a file ``attempt.tex``\n that contains a placeholder integer for the number of attempts the person\n taking the assignment has made (optional; depends on keyword argument\n ``multipleattempts``, described below).\n\n* Write the assignment within the LaTeX document, using PythonTeX as desired\n to generate random values for parameters.\n\n* At the beginning of each PythonTeX session::\n\n from randassign import RandAssign\n ra = RandAssign()\n\n Within the session, add solutions via ``ra.addsoln()``. This takes\n an arbitrary number of arguments, corresponding to the solutions for a\n single problem; if multiple arguments are received, they are treated as\n the solutions to a multi-part problem. The optional, keyword argument\n ``info`` is used to pass information about the problem into the\n solutions. The keyword argument ``number`` may be used to set the\n problem number manually when the problems created in a session are not\n directly sequential. When solutions are created with ``addsoln()``,\n solutions are formatted automatically; only the actual answers and any\n accompanying info need be provided.\n\n* Alternately, solutions may be created by appending text to the list\n ``ra.soln``. Solutions created in this way will not be automatically\n numbered and formatted; the user has complete, direct control over the form\n of the solution text. Any desired linebreaks must be included explicitly as\n ``\\n`` in the text that is appended to ``ra.soln``. This method of creating\n solutions may not be mixed with ``ra.addsoln()``.\n\n* Create a text file ``students.txt`` that contains the names of all\n individuals for whom assignments are to be generated, with one name per line.\n Commas should only appear in names in \"Last, First\" format. Put this file\n in the same directory as the LaTeX file.\n\n* Run the command-line utility ``randassign``::\n\n randassign \n\n By default, this will create a directory ``randassign`` in the LaTeX file's\n directory. Within this will be an ``assignments`` directory that contains\n an assignment for each student, and a ``solutions`` directory that contains\n complete solutions for all students within a single PDF document, as well\n as a data file in JSON format.\n\n Run the ``randassign`` utility again as desired to create additional\n assignments to allow for additional attempts. Solutions will be updated\n automatically. Use the ``--student `` command-line flag to\n generate an additional assignment for only a single student.\n\n\n\nError handling\n--------------\n\nThe ``randassign`` utility (and ``make()`` function) is carefully designed so\nthat if an error occurs during a run, all assignments generated during that run\nwill automatically be discarded. If an error occurs, it should typically be\nadequate to resolve the error and then run ``randassign`` again, without\nperforming any manual cleanup from the failed run.\n\nIn the event that automatic cleanup somehow fails, ``randassign`` also creates\nbackups of the data file in which raw assignment data and metadata are stored.\nThese are saved in the same directory as the data file, which is by default\nin the directory with the solutions.\n\n\n\nCustomization\n-------------\n\nThe ``randassign`` utility accepts a limited number of command-line arguments\nto customize settings. Run ``randassign --help`` for a list of available\noptions.\n\nFurther customization is available by creating a Python script and passing\narguments to ``randassign``'s ``make()`` function::\n\n from randassign import make\n make(texfile='', )\n\nThe ``make()`` function accepts the following keyword arguments. Note that\nall paths (including all ``*dir`` keywords) are interpreted relative to the\nLaTeX file's directory, rather than relative to the current working directory.\nThis ensures that LaTeX functions smoothly and does not attempt to write to\ndirectories outside the document directory and its subdirectories. Absolute\npaths may be used when this behavior is not desired.\n\nUnix-style paths with forward slashes, and with leading ``~`` expanding to the\nuser's home directory, will work under all systems, including Windows.\n\n``argv`` (*bool*) default: ``True``\n Whether to supplement supplied arguments from ``sys.argv``, using the parser\n from the ``randassign`` command-line utility.\n\n``verbose`` (*bool*) default: ``False``\n Verbose output.\n\n``silent`` (*bool*) default: ``False``\n Suppress all output.\n\n``texfile`` (*str*)\n LaTeX file from which to generate assignments.\n\n``texcmd`` (*str* or *list* of *str*) default: ``pdflatex -interaction=nonstopmode``\n Command for compiling LaTeX file (does not include file name).\n\n``pythontexcmd`` (*str* or *list* of *str*) default: ``pythontex --rerun always``\n Command for running PythonTeX (does not include file name).\n\n``randassigndir`` (*str*) default: ``randassign``\n Root directory for saving created assignments and solutions.\n\n``subdirs`` (*bool*) default: ``True``\n Whether to create subdirectories under ``randassigndir`` for assignments and\n solutions.\n\n``assigndir`` (*str*) default: ``assignments``\n Subdirectory for assignments.\n\n``solndir`` (*str*) default: ``solutions``\n Subdirectory for solutions.\n\n``namefile`` (*str*) default: ``name.tex``\n LaTeX file containing the name of the current student.\n\n``attemptfile`` (*str*) default: ``attempt.tex``\n LaTeX file containing the number of the current attempt.\n\n``student`` (*str*) default: ``None``\n An individual student for whom to generate assignments.\n\n``studentfile`` (*str*) default: ``students.txt``\n File containing the names of all students. ``txt`` files with names in\n \"Last, First\" or \"First Last\" form are accepted, as well as CSV files with\n the first column containing last names and the second column containing first\n names (with no header row).\n\n``parsestudentfile`` (*function*)\n Function for parsing the student file and returning a list of student names\n in the form needed for assignments. See ``_parsestudentfile`` in ``make.py``\n for an example.\n\n``parsestudentname`` (*function*)\n Function for parsing individual lines/rows of the student file into student\n names in the desired format.\n\n``onlysolutions`` (*bool*) default: ``False``\n Only generate solutions; do not generate any assignments. Useful for\n regenerating solutions in a different format or with a different template.\n\n``solnfile`` (*str*) default: ``solutions.tex``\n Solution file.\n\n``solnfmt`` (*str*) default: ``tex``\n Solution file format. ``tex`` and ``md``/``markdown`` are accepted.\n\n``solncmd`` (*str* or *list* of *str*, or ``None``) default: ``pdflatex -interaction=nonstopmode``\n Command for post-processing solution file (does not include file name).\n Should be ``None``/evaluate to ``False`` if no post-processing is desired.\n\n``writesoln`` (*function*)\n Function for writing the solutions, given the solution data, templates, and\n other parameters. See ``_writesoln()`` in ``make.py`` for an example.\n\n``msgfilepattern`` (*str*) default: ``_randassign.*.json``\n Pattern for identifying \"message\" files, files containing solutions, that are\n saved by PythonTeX and used to pass data to RandAssign.\n\n``onlylastsoln`` (*bool*) default: ``False``\n Solutions include all solutions for all attempts for each students, or only\n the solutions from the most recent attempt (all solutions are still saved in\n the data file).\n\n``multipleattempts`` (*bool*) default: ``True``\n Whether multiple attempts will be given for an assignment; this determines\n whether attempts are listed/numbered in solutions.\n\n``randassigndatafile`` (*str*) default: ``/.``\n File for saving raw solution data and associated metadata.\n\n``randassigndatafilefmt`` (*str*) default: ``json.zip``\n Format for data file. Accepted options are ``json``, ``json.zip``, and\n ``pickle``/``pkl``.\n\n``solntemplatedoc`` (*str*)\n Template for overall solution document; see examples in ``make.py``.\n\n``solntemplatestudent`` (*str*)\n Template for overall solutions for each student.\n\n``solntemplatesolnsattempt`` (*str*)\n Template for attempt heading.\n\n``solntemplatesolnswrapper`` (*str*)\n Template for wrapping a set of solutions, if the set of solutions needs to be\n preceded and followed by markup.\n\n``solntemplatesolnsingle`` (*str*)\n Template for a one-part solution.\n\n``solntemplatesolnsingleinfo`` (*str*)\n Template for a one-part solution that includes additional info from the\n problem.\n\n``solntemplatesolnmultiwrapper`` (*str*)\n Template for wrapping a multi-part solution.\n\n``solntemplatesolnmultiwrapperinfo`` (*str*)\n Template for wrapping a multi-part solution that includes additional info\n from the problem.\n\n``solntemplatesolnmulti`` (*str*)\n Template for each piece of a multi-part solution.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/gpoore/randassign", "keywords": "education,PythonTeX", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "randassign", "package_url": "https://pypi.org/project/randassign/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/randassign/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/gpoore/randassign" }, "release_url": "https://pypi.org/project/randassign/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Create randomized assignments with PythonTeX", "version": "1.0.1" }, "last_serial": 1894258, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8e77edb7d6c0b0c422d17e39f50523d6", "sha256": "450ccf7c07b50baf4233c5c71aacab8fb422f9debb4ecbe06e33c3e6b5ea111f" }, "downloads": -1, "filename": "randassign-1.0.0.zip", "has_sig": false, "md5_digest": "8e77edb7d6c0b0c422d17e39f50523d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31985, "upload_time": "2015-11-21T01:18:28", "url": "https://files.pythonhosted.org/packages/fa/c6/1ad1982f5c37e1ad7fd44c827992007a2c2a9aa3cf45119ab5bcf8eb4776/randassign-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "0581bf86ded58defdc4994440edb7992", "sha256": "756b79df49ba1b2b5e1ebf552da538efb7ec4147633693c86d58771d2594c826" }, "downloads": -1, "filename": "randassign-1.0.1.zip", "has_sig": false, "md5_digest": "0581bf86ded58defdc4994440edb7992", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31954, "upload_time": "2016-01-08T02:46:06", "url": "https://files.pythonhosted.org/packages/89/ee/34a4b563165494961925b3f854f3c56f613d80ae210f6dd30bc16c9fd318/randassign-1.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0581bf86ded58defdc4994440edb7992", "sha256": "756b79df49ba1b2b5e1ebf552da538efb7ec4147633693c86d58771d2594c826" }, "downloads": -1, "filename": "randassign-1.0.1.zip", "has_sig": false, "md5_digest": "0581bf86ded58defdc4994440edb7992", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31954, "upload_time": "2016-01-08T02:46:06", "url": "https://files.pythonhosted.org/packages/89/ee/34a4b563165494961925b3f854f3c56f613d80ae210f6dd30bc16c9fd318/randassign-1.0.1.zip" } ] }