{ "info": { "author": "Jolyon Bloomfield", "author_email": "jolyon@mit.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Education", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Education :: Computer Aided Instruction (CAI)" ], "description": "# OLX Cleaner\n\n[![Build Status](https://api.travis-ci.org/jolyonb/olxcleaner.svg?branch=master)](https://travis-ci.org/jolyonb/olxcleaner) [![Coverage Status](https://codecov.io/gh/jolyonb/olxcleaner/branch/master/graphs/badge.svg)](https://codecov.io/gh/jolyonb/olxcleaner)\n\nThis library aims to perform two functions:\n\n* Parse the XML code for an edX course, loading it into python objects\n* Validate the objects for errors\n\nBased on this, two scripts are provided that leverage the library:\n\n* `edx-cleaner` constructs an error report, course tree and course statistics\n* `edx-reporter` constructs a LaTeX file representation of the course structure\n\nVersion 0.1.3\n\nCopyright (C) 2018-2019 Jolyon Bloomfield\n\n## Links\n\n* [Error Listing](errors.md)\n* [Wishlist](wishlist.md)\n* [Vision](vision.md)\n* [Changelog](changelog.md)\n* [License](LICENSE)\n\n## Installation\n\nThis package may be installed from PYPI using `pip install olxcleaner`. It requires python 3.6 or later.\n\n### Repository Installation (advanced) \n\nClone this repository, and set up a virtual environment for python 3.6 or later. Run `pip install -r requirements.txt` to install the libraries, followed by `pytest` to ensure that all tests are passing as expected.\n\n## edx-cleaner Usage\n\nUsed to validate OLX (edX XML) code. This is a very light wrapper around the olxcleaner library, but exposes all of the functionality thereof.\n\nBasic usage: run `edx-cleaner` in the directory of the course you want to validate.\n\nCommand-line options:\n\n```text\nedx-cleaner [-h] \n [-c COURSE]\n [-p {1,2,3,4,5,6,7,8}] \n [-t TREE] [-l {0,1,2,3,4}]\n [-q] [-e] [-s] [-S]\n [-f {0,1,2,3,4}]\n [-i IGNORE [IGNORE ...]]\n```\n\n* `-h`: Display help.\n* `-c`: Specify the course file to analyze. If not specified, looks for `course.xml` in the current directory. If given a directory, looks for `course.xml` in that directory.\n* `-p`: Specify the validation level you wish analyze the course at:\n * 1: Load the course\n * 2: Load the policy and grading policy\n * 3: Validate url_names\n * 4: Merge policy data with course, ensuring that all references are valid\n * 5: Validate the grading policy\n * 6: Have every object validate itself\n * 7: Parse the course for global errors\n * 8: Parse the course for detailed global errors (default)\n* `-t TREE`: Specify a file to output the tree structure to.\n* `-l`: Specify the depth level to output the tree structure to. Only used if the `-t` option is set. 0 = Course, 1 = Chapter, 2 = Sequential, 3 = Vertical, 4 = Content. \n* `-q`: Quiet mode. Does not output anything to the screen.\n* `-e`: Suppress error listing. Implied by `-q`.\n* `-s`: Suppress summary of errors. Implied by `-q`.\n* `-S`: Display course statistics (off by default). Overridden by `-q`.\n* `-f`: Select the error level at which to exit with an error code. 0 = DEBUG, 1 = INFO, 2 = WARNING, 3 = ERROR (default), 4 = NEVER. Exit code is set to `1` if an error at the specified level or higher is present.\n* `-i`: Specify a space-separated list of error names to ignore. See [Error Listing](errors.md).\n\n## edx-reporter Usage\n\nThe olxcleaner library includes modules that parse a course into python objects. This can be useful if you want to scan a course to generate a report. We exploit this in `edx-reporter` to generate a LaTeX report of course structure.\n\nBasic usage: run `edx-reporter` in the directory of the course you want to generate a report about.\n\nCommand-line options:\n\n```text\nedx-reporter.py [-h] \n [-c COURSE]\n [-u]\n [> latexfile.tex]\n```\n\n* `-h`: Display help.\n* `-c`: Specify the course file to analyze. If not specified, looks for `course.xml` in the current directory. If given a directory, looks for `course.xml` in that directory.\n* `-u`: Include url_names for verticals.\n* `> latexfile.tex`: Output the report to a file.\n\nIf you get an error like ``Character cannot be encoded into LaTeX: U+FEFF - `'``, then you have some bad unicode in your `display_name` entries. Look through the LaTeX output for `{\\bfseries ?}`, which is what that character is converted into.\n\nOnce you have generated a latex file, you can compile it into a PDF file by running `pdflatex latexfile.tex`. Note that the latex file can be modified with any text editor; its format should be self-explanatory.\n\n## Library usage\n\nThe workhorse of the library is `olxcleaner.validate`, which validates a course in a number of steps.\n\n```python\nolxcleaner.validate(filename, steps=8, ignore=None)\n```\n\n* `filename`: Pass in either the course directory or the path of `course.xml` for the course you wish to validate.\n* `steps`: Choose how many validation steps you wish to perform:\n * 1: Load the course\n * 2: Load the policy and grading policy\n * 3: Validate `url_name`s\n * 4: Merge policy data with course, ensuring that all references are valid\n * 5: Validate the grading policy\n * 6: Have every object validate itself\n * 7: Parse the course for global errors\n * 8: Parse the course for global errors that may be time-consuming to detect\n* `ignore`: A list of error names to ignore\n\nReturns `EdxCourse`, `ErrorStore`, `url_names` (dictionary `{'url_name': EdxObject}`, or `None` if `steps < 3`)\n\nSee examples of how to use `olxcleaner.validate` and the objects it returns in `olxcleaner.entries`.\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/jolyonb/olxcleaner", "keywords": "edx", "license": "LICENSE", "maintainer": "", "maintainer_email": "", "name": "olxcleaner", "package_url": "https://pypi.org/project/olxcleaner/", "platform": "", "project_url": "https://pypi.org/project/olxcleaner/", "project_urls": { "Homepage": "https://github.com/jolyonb/olxcleaner" }, "release_url": "https://pypi.org/project/olxcleaner/0.1.3/", "requires_dist": [ "lxml", "python-dateutil", "pytz", "pylatexenc" ], "requires_python": "~=3.6", "summary": "Tool to scan edX courses for various errors", "version": "0.1.3" }, "last_serial": 5694814, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "df27fafb96921bdc1ffcc1c1e0287c0b", "sha256": "dfdc5595b60d1f799025d93083bdb22dc509915f42f6372bcec39da2bdcb41aa" }, "downloads": -1, "filename": "olxcleaner-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "df27fafb96921bdc1ffcc1c1e0287c0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 55212, "upload_time": "2019-07-29T19:39:55", "url": "https://files.pythonhosted.org/packages/24/76/c005b4396d22509f416f7f03d139f9531df27fa4fad60a71375c74f51886/olxcleaner-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80581178a350d28ae46e9ff527254590", "sha256": "3c716f8ce2d648b6c45a59ddfd6eaf1db6d7ac3d12858e922aa1e7bde1c2eaac" }, "downloads": -1, "filename": "olxcleaner-0.1.0.tar.gz", "has_sig": false, "md5_digest": "80581178a350d28ae46e9ff527254590", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 43709, "upload_time": "2019-07-29T19:39:58", "url": "https://files.pythonhosted.org/packages/26/ef/4294fbfe79c5bee577951f67a46dc5d3fc138ad8e7c560e119b447f20e5f/olxcleaner-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b0033180d61943993602b2ee5b4ee294", "sha256": "35e9b47c947bbb58d810c32315b2dac269e6e32d9adeed31d1eba15aca00df96" }, "downloads": -1, "filename": "olxcleaner-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b0033180d61943993602b2ee5b4ee294", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 55348, "upload_time": "2019-07-30T12:57:19", "url": "https://files.pythonhosted.org/packages/ae/a5/4a6eed58c6f78bea09d2e7262b1070d9991af8e95710208ffebce5e61129/olxcleaner-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4aa83709d38d73075d8324ae5c8a5d83", "sha256": "f2e101592e45074519cadb9c72558cbf9a768785657bc4c1ca45f87ab292c059" }, "downloads": -1, "filename": "olxcleaner-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4aa83709d38d73075d8324ae5c8a5d83", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 43933, "upload_time": "2019-07-30T12:57:21", "url": "https://files.pythonhosted.org/packages/3b/ed/e68abe15084e335359e81f425a6516ac816b6a215a948a6c8ccda139a853/olxcleaner-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "adfda1930260f0620f3523a49b6a49c6", "sha256": "c14b9793a109964738c9ca748f45d7dfa92f6048d0c9fc3c7ea094ddea32ba62" }, "downloads": -1, "filename": "olxcleaner-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "adfda1930260f0620f3523a49b6a49c6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 55582, "upload_time": "2019-08-16T03:28:24", "url": "https://files.pythonhosted.org/packages/ea/8f/1b1e5ae51094e72ec8d4f2fc09d9a3782c7f597b236481d78beed0018edf/olxcleaner-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a299b279848aa3f03ae4ef57c0abab59", "sha256": "8a93d70fb58b430bf7571147126a9d445d9201b6506a680c5545e1cde671a0fe" }, "downloads": -1, "filename": "olxcleaner-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a299b279848aa3f03ae4ef57c0abab59", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 44062, "upload_time": "2019-08-16T03:28:28", "url": "https://files.pythonhosted.org/packages/22/3e/38707a68d70e4cb2240d7d184e23fc014f757042fa8468a81927093b5807/olxcleaner-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ef2f2a1f5b8a103e2a2638e319489f13", "sha256": "0585cecc653ccafbd4a16da7a8574fd9c55c1c10c48d76970a88b96ab213ba9a" }, "downloads": -1, "filename": "olxcleaner-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ef2f2a1f5b8a103e2a2638e319489f13", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 55591, "upload_time": "2019-08-18T14:41:30", "url": "https://files.pythonhosted.org/packages/b5/eb/41c622fca3c741171ab526c304311b5de308005b87ed30cd152b079f7359/olxcleaner-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd92c697c874f80d92816fd0a0c65274", "sha256": "037c137b0f8a3452aaeed0f7868b90c71d178cc734b82fb3942d8cc8b82175d8" }, "downloads": -1, "filename": "olxcleaner-0.1.3.tar.gz", "has_sig": false, "md5_digest": "bd92c697c874f80d92816fd0a0c65274", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 44143, "upload_time": "2019-08-18T14:41:34", "url": "https://files.pythonhosted.org/packages/3a/78/92b755676930310ab38fc334c3d77fda772fbf19a5cbd2fcbba40ff8be2f/olxcleaner-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef2f2a1f5b8a103e2a2638e319489f13", "sha256": "0585cecc653ccafbd4a16da7a8574fd9c55c1c10c48d76970a88b96ab213ba9a" }, "downloads": -1, "filename": "olxcleaner-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ef2f2a1f5b8a103e2a2638e319489f13", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 55591, "upload_time": "2019-08-18T14:41:30", "url": "https://files.pythonhosted.org/packages/b5/eb/41c622fca3c741171ab526c304311b5de308005b87ed30cd152b079f7359/olxcleaner-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd92c697c874f80d92816fd0a0c65274", "sha256": "037c137b0f8a3452aaeed0f7868b90c71d178cc734b82fb3942d8cc8b82175d8" }, "downloads": -1, "filename": "olxcleaner-0.1.3.tar.gz", "has_sig": false, "md5_digest": "bd92c697c874f80d92816fd0a0c65274", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 44143, "upload_time": "2019-08-18T14:41:34", "url": "https://files.pythonhosted.org/packages/3a/78/92b755676930310ab38fc334c3d77fda772fbf19a5cbd2fcbba40ff8be2f/olxcleaner-0.1.3.tar.gz" } ] }