{ "info": { "author": "Amit Rathi", "author_email": "amit@reviewnb.com", "bugtrack_url": null, "classifiers": [], "description": "[![PyPI version](https://badge.fury.io/py/numcompress.svg)](https://badge.fury.io/py/treon)\n\n# treon\nEasy to use test framework for Jupyter Notebooks.\n* Runs notebook top to bottom and flags execution errors if any\n* Runs [unittest](https://docs.python.org/2/library/unittest.html) present in your notebook code cells \n* Runs [doctest](https://docs.python.org/2/library/doctest.html) present in your notebook code cells\n\n### Why should you use it?\n* Start testing notebooks without writing a single line of code\n* Multithreaded execution for quickly testing a set of notebooks\n* Executes every Notebook in a fresh kernel to avoid kernel state interference\n* Primarily a command line tool that can be used easily in any Continuous Integration (CI) system\n* Soon to be part of [ReviewNB](https://www.reviewnb.com/)'s CI system that automatically runs treon everytime you push notebook changes to GitHub\n\n\n## Installation\n```\npip install treon\n```\n\n## Usage\n```\n$ treon\nExecuting treon version 0.1.0\nRecursively scanning /workspace/treon/tmp/docs/site/ru/guide for Notebooks...\n\n-----------------------------------------------------------------------\nCollected following Notebooks for testing\n-----------------------------------------------------------------------\n/workspace/treon/tmp/docs/site/ru/guide/keras.ipynb\n/workspace/treon/tmp/docs/site/ru/guide/eager.ipynb\n-----------------------------------------------------------------------\n\nTriggered test for /workspace/treon/tmp/docs/site/ru/guide/keras.ipynb\nTriggered test for /workspace/treon/tmp/docs/site/ru/guide/eager.ipynb\n\ntest_sum (__main__.TestNotebook) ... \nok\ntest_sum (__main__.TestNotebook2) ... \nok\ntest_sum (__main__.TestNotebook3) ... \nok\n\n----------------------------------------------------------------------\nRan 3 tests in 0.004s\n\nOK\n\n-----------------------------------------------------------------------\nTEST RESULT\n-----------------------------------------------------------------------\n/workspace/treon/tmp/docs/site/ru/guide/keras.ipynb -- PASSED \n/workspace/treon/tmp/docs/site/ru/guide/eager.ipynb -- PASSED \n-----------------------------------------------------------------------\n2 succeeded, 0 failed, out of 2 notebooks tested.\n-----------------------------------------------------------------------\n```\n\n## Command line arguments\n```\nUsage:\n treon\n treon [PATH] [--threads=]\n\nArguments:\n PATH File or directory path to find notebooks to test. Searches recursively for directory paths. [default: current working directory]\n\nOptions:\n --threads= Number of parallel threads. Each thread processes one notebook file at a time. [default: 10]\n -h --help Show this screen.\n --version Show version.\n\n```\n\n## unitttest example\nYou just need to add tests as shown below & treon would execute them and report the result on the console. See [this](https://docs.python.org/2/library/unittest.html) for more details on how to write unittest.\n\n![](images/unittest.png)\n\n## doctest example\nYou just need to add tests as shown below & treon would execute them and report the result on the console. See [this](https://docs.python.org/2/library/doctest.html) for more details on how to write doctest.\n\n![](images/doctest.png)\n\n## Note about dependencies\n* You need to run treon from environment (virtualenv/pipenv etc.) that has all the dependcies required for Notebooks under test\n* treon only works with python3+ environments and uses python3 kernel for executing notebooks\n\n## Motivation\nOur aim at [ReviewNB](https://www.reviewnb.com/) is to make notebooks a first class entity in the production workflow. We've built a code review system for Notebooks. The next step is to [build a CI pipeline](https://github.com/ReviewNB/support/issues/19) & treon is the core tool in that effort. It is licensed librerally (MIT) & I foresee it being used as an independent tool as well. You can use it locally and/or integrate with CI system of your choice.\n\nFor motivation, checkout [Netflix's blog](https://medium.com/netflix-techblog/scheduling-notebooks-348e6c14cfd6) to see how notebooks are graduating from scratchpad to a part of production workflow.\n\n## Contribute\nIf you see any problem, open an issue or send a pull request. You can write to team@reviewnb.com for any questions.\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/reviewNB/treon", "keywords": "test,jupyter,notebook,jupyter test,notebook test,unittest,doctest", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "treon", "package_url": "https://pypi.org/project/treon/", "platform": "", "project_url": "https://pypi.org/project/treon/", "project_urls": { "Homepage": "https://github.com/reviewNB/treon" }, "release_url": "https://pypi.org/project/treon/0.1.2/", "requires_dist": [ "nbconvert", "jupyter-client", "jupyter", "docopt" ], "requires_python": ">=3", "summary": "Testing framework for Jupyter Notebooks", "version": "0.1.2" }, "last_serial": 5421003, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "5c93c96d3949386cf629e34f981ce020", "sha256": "b1c29012deac96c7fa1b00cf5db5d281171d55d9c746a5882ad5e449a8a5f58c" }, "downloads": -1, "filename": "treon-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5c93c96d3949386cf629e34f981ce020", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 6754, "upload_time": "2019-04-04T10:56:06", "url": "https://files.pythonhosted.org/packages/00/cc/3529855d0f0be17d9b41baac8b85944b98ea9b8001345a53729c41548b45/treon-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2db676a59bfd70b0223272151cd3ea1c", "sha256": "26a5ddddaa4a33ab9a133935e1cb85b1b96e2af59d563a5ce98cf1249b32f28b" }, "downloads": -1, "filename": "treon-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2db676a59bfd70b0223272151cd3ea1c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 5721, "upload_time": "2019-04-04T10:56:07", "url": "https://files.pythonhosted.org/packages/a8/67/4630936f5aeb5775f125aa2a54d6f97cd0b5f07a902820ac7e53da418642/treon-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "dd5715103fafda9e23ff5c6e01f7fc72", "sha256": "71f0febb29f712baca35c40b535a19a976f4867dd60f709794a04d6db6dafbc0" }, "downloads": -1, "filename": "treon-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "dd5715103fafda9e23ff5c6e01f7fc72", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7030, "upload_time": "2019-06-19T15:43:36", "url": "https://files.pythonhosted.org/packages/d7/08/36d3bd9297d108f2849b76ab2740bd2a133dd9e5f2e52f85affca9af37da/treon-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec9d2adc7dd247c0090d7140c0b59f9c", "sha256": "d5a45b80eeda5a6747a0325c69a46ef1fa595e10b370469bf3a0456ea16f88a2" }, "downloads": -1, "filename": "treon-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ec9d2adc7dd247c0090d7140c0b59f9c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 5981, "upload_time": "2019-06-19T15:43:38", "url": "https://files.pythonhosted.org/packages/70/8f/c49e06bbd49958927bb4437ace41d4639c63d384d9efc9b093ebbac222e0/treon-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dd5715103fafda9e23ff5c6e01f7fc72", "sha256": "71f0febb29f712baca35c40b535a19a976f4867dd60f709794a04d6db6dafbc0" }, "downloads": -1, "filename": "treon-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "dd5715103fafda9e23ff5c6e01f7fc72", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 7030, "upload_time": "2019-06-19T15:43:36", "url": "https://files.pythonhosted.org/packages/d7/08/36d3bd9297d108f2849b76ab2740bd2a133dd9e5f2e52f85affca9af37da/treon-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec9d2adc7dd247c0090d7140c0b59f9c", "sha256": "d5a45b80eeda5a6747a0325c69a46ef1fa595e10b370469bf3a0456ea16f88a2" }, "downloads": -1, "filename": "treon-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ec9d2adc7dd247c0090d7140c0b59f9c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 5981, "upload_time": "2019-06-19T15:43:38", "url": "https://files.pythonhosted.org/packages/70/8f/c49e06bbd49958927bb4437ace41d4639c63d384d9efc9b093ebbac222e0/treon-0.1.2.tar.gz" } ] }