jupyter2pytest


Namejupyter2pytest JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://github.com/dsdiscovery/jupyter2pytest
SummaryConverts Jupyter notebooks into pytest capable test files.
upload_time2023-05-31 20:19:15
maintainer
docs_urlNone
authorGarrett Credi
requires_python>=3.6,<4.0
licenseMIT
keywords pytest jupyter autograding
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Jupyter Notebook Grader

This is a script that will compile a jupyter notebook with a specified structure into a python script that is pytest compatible.

For use in code, `extractor` handles extracting cells from a notebook with a given prefix into a `TestcellBlock` object. `compiler` deals more with taking an assignment notebook and a notebook with testcases,
which can be and often are the same notebook, and with specified prefixes and writing it into a python file capable of running against pytest. For example, the prefix for assignment code could be 
`### ASSIGNMENT CODE for Puzzle (.*) ==` where the group in the regex determines what test the code applies to. Prefixes must have at least one group to match against, and that first group will be the
identification used. To run as a CLI tool, use `python3 -m jupyter2pytest [code file] [code prefix] [test file] [test prefix] [pytest output file]`.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dsdiscovery/jupyter2pytest",
    "name": "jupyter2pytest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<4.0",
    "maintainer_email": "",
    "keywords": "pytest,jupyter,autograding",
    "author": "Garrett Credi",
    "author_email": "garrettcredi@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/89/a6/e5b7cfe687da6541ab5dd330340a7f9c50232820bbf4bdc805efb65b23f6/jupyter2pytest-0.3.2.tar.gz",
    "platform": null,
    "description": "# Jupyter Notebook Grader\n\nThis is a script that will compile a jupyter notebook with a specified structure into a python script that is pytest compatible.\n\nFor use in code, `extractor` handles extracting cells from a notebook with a given prefix into a `TestcellBlock` object. `compiler` deals more with taking an assignment notebook and a notebook with testcases,\nwhich can be and often are the same notebook, and with specified prefixes and writing it into a python file capable of running against pytest. For example, the prefix for assignment code could be \n`### ASSIGNMENT CODE for Puzzle (.*) ==` where the group in the regex determines what test the code applies to. Prefixes must have at least one group to match against, and that first group will be the\nidentification used. To run as a CLI tool, use `python3 -m jupyter2pytest [code file] [code prefix] [test file] [test prefix] [pytest output file]`.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Converts Jupyter notebooks into pytest capable test files.",
    "version": "0.3.2",
    "project_urls": {
        "Homepage": "https://github.com/dsdiscovery/jupyter2pytest",
        "Repository": "https://github.com/dsdiscovery/jupyter2pytest"
    },
    "split_keywords": [
        "pytest",
        "jupyter",
        "autograding"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95cec0663c96b84526d2e4d5d2632690c4e0460a6fb085b29bd4934faeec1917",
                "md5": "0d29823f0e7d5ab85ed32f64eb511452",
                "sha256": "6cfacd155bc94ac1a99c7056b45bdb76ef446f635f7eb56b8d74ebb92f9aa62b"
            },
            "downloads": -1,
            "filename": "jupyter2pytest-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0d29823f0e7d5ab85ed32f64eb511452",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<4.0",
            "size": 8168,
            "upload_time": "2023-05-31T20:19:13",
            "upload_time_iso_8601": "2023-05-31T20:19:13.874313Z",
            "url": "https://files.pythonhosted.org/packages/95/ce/c0663c96b84526d2e4d5d2632690c4e0460a6fb085b29bd4934faeec1917/jupyter2pytest-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89a6e5b7cfe687da6541ab5dd330340a7f9c50232820bbf4bdc805efb65b23f6",
                "md5": "35267ecd2ed38db30d59966ee8ca61a4",
                "sha256": "4dca789031ebd67678724ed50a1276dd411785f1592c9709422ff9a51801b51e"
            },
            "downloads": -1,
            "filename": "jupyter2pytest-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "35267ecd2ed38db30d59966ee8ca61a4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<4.0",
            "size": 4912,
            "upload_time": "2023-05-31T20:19:15",
            "upload_time_iso_8601": "2023-05-31T20:19:15.755498Z",
            "url": "https://files.pythonhosted.org/packages/89/a6/e5b7cfe687da6541ab5dd330340a7f9c50232820bbf4bdc805efb65b23f6/jupyter2pytest-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-31 20:19:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dsdiscovery",
    "github_project": "jupyter2pytest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jupyter2pytest"
}
        
Elapsed time: 0.07809s