Name | enforce-notebook-run-order JSON |
Version |
2.0.0
JSON |
| download |
home_page | None |
Summary | Don't let notebook cells run out of order |
upload_time | 2024-07-24 21:52:44 |
maintainer | None |
docs_url | None |
author | Chris Hacker |
requires_python | <4.0,>=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="left">
<a href="https://badge.fury.io/py/enforce-notebook-run-order">
<img src="https://badge.fury.io/py/enforce-notebook-run-order@2x.png" alt="PyPI version" height="20">
</a>
<a href="https://codecov.io/gh/christopher-hacker/enforce-notebook-run-order" >
<img src="https://codecov.io/gh/christopher-hacker/enforce-notebook-run-order/branch/main/graph/badge.svg?token=019MXVQYN5"/>
</a>
<a href="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/test.yaml">
<img src="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/test.yaml/badge.svg" alt="Run tests">
</a>
<a href="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/auto-tag.yml">
<img src="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/auto-tag.yml/badge.svg" alt="Create a tag if version changed">
</a>
<a href="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/publish-pypi.yaml">
<img src="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/publish-pypi.yaml/badge.svg" alt="Publish to PyPi">
</a>
<a href="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/docs.yml">
<img src="https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/docs.yml/badge.svg" alt="Build docs">
</a>
</p>
enforce-notebook-run-order
==========================
Enforce the run order of Jupyter notebooks.
Jupyter notebooks are great for interactive data analysis. However, when
they can encourage a bad habit: running cells out of order. This can
lead to notebooks being committed to the repository in a state where
they don\'t run from top to bottom, and other collaborators may receive
different results when running the notebook from top to bottom.
`enforce-notebook-run-order` enforces the run order of a notebook by
raising an exception if any cells are run out of order.
Installation
------------
`enforce-notebook-run-order` can be installed via pip:
``` {.sourceCode .bash}
pip install enforce-notebook-run-order
```
It can also be set up as a [pre-commit hook](https://pre-commit.com/).
See the [pre-commit hook](#pre-commit-hook) section for more details.
Usage
-----
`enforce-notebook-run-order` can be used as a standalone script, or as a
[pre-commit hook](https://pre-commit.com/).
### Standalone
To use `enforce-notebook-run-order` as a standalone script, simply run
it with the path to the notebook(s) you want to check:
``` {.sourceCode .bash}
nbcheck my_notebook.ipynb my_other_notebook.ipynb
```
Or point it to a directory to check all notebooks in that directory:
``` {.sourceCode .bash}
nbcheck my_notebooks/
```
If no paths are specified, `nbcheck` will check all notebooks in the
current directory.
You can also use the full `enforce-notebook-run-order` command, but the
`nbcheck` command is provided as a convenience.
### pre-commit hook
To use `enforce_notebook_run_order` as a pre-commit hook, add the
following to your `.pre-commit-config.yaml`:
``` {.sourceCode .yaml}
repos:
- repo: https://github.com/christopher-hacker/enforce-notebook-run-order
rev: 1.7.0
hooks:
- id: enforce-notebook-run-order
```
Raw data
{
"_id": null,
"home_page": null,
"name": "enforce-notebook-run-order",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Chris Hacker",
"author_email": "c.m.hacker1997@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/af/f1/3e9abb99c75e8e17a7305bdde6e1316166f9a505b48513c0cca8795c4bf6/enforce_notebook_run_order-2.0.0.tar.gz",
"platform": null,
"description": "<p align=\"left\">\n <a href=\"https://badge.fury.io/py/enforce-notebook-run-order\">\n <img src=\"https://badge.fury.io/py/enforce-notebook-run-order@2x.png\" alt=\"PyPI version\" height=\"20\">\n </a>\n <a href=\"https://codecov.io/gh/christopher-hacker/enforce-notebook-run-order\" > \n <img src=\"https://codecov.io/gh/christopher-hacker/enforce-notebook-run-order/branch/main/graph/badge.svg?token=019MXVQYN5\"/> \n </a>\n <a href=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/test.yaml\">\n <img src=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/test.yaml/badge.svg\" alt=\"Run tests\">\n </a>\n <a href=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/auto-tag.yml\">\n <img src=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/auto-tag.yml/badge.svg\" alt=\"Create a tag if version changed\">\n </a>\n <a href=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/publish-pypi.yaml\">\n <img src=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/publish-pypi.yaml/badge.svg\" alt=\"Publish to PyPi\">\n </a>\n <a href=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/docs.yml\">\n <img src=\"https://github.com/christopher-hacker/enforce-notebook-run-order/actions/workflows/docs.yml/badge.svg\" alt=\"Build docs\">\n </a>\n</p>\n\nenforce-notebook-run-order\n==========================\n\nEnforce the run order of Jupyter notebooks.\n\nJupyter notebooks are great for interactive data analysis. However, when\nthey can encourage a bad habit: running cells out of order. This can\nlead to notebooks being committed to the repository in a state where\nthey don\\'t run from top to bottom, and other collaborators may receive\ndifferent results when running the notebook from top to bottom.\n\n`enforce-notebook-run-order` enforces the run order of a notebook by\nraising an exception if any cells are run out of order.\n\nInstallation\n------------\n\n`enforce-notebook-run-order` can be installed via pip:\n\n``` {.sourceCode .bash}\npip install enforce-notebook-run-order\n```\n\nIt can also be set up as a [pre-commit hook](https://pre-commit.com/).\nSee the [pre-commit hook](#pre-commit-hook) section for more details.\n\nUsage\n-----\n\n`enforce-notebook-run-order` can be used as a standalone script, or as a\n[pre-commit hook](https://pre-commit.com/).\n\n### Standalone\n\nTo use `enforce-notebook-run-order` as a standalone script, simply run\nit with the path to the notebook(s) you want to check:\n\n``` {.sourceCode .bash}\nnbcheck my_notebook.ipynb my_other_notebook.ipynb\n```\n\nOr point it to a directory to check all notebooks in that directory:\n\n``` {.sourceCode .bash}\nnbcheck my_notebooks/\n```\n\nIf no paths are specified, `nbcheck` will check all notebooks in the\ncurrent directory.\n\nYou can also use the full `enforce-notebook-run-order` command, but the\n`nbcheck` command is provided as a convenience.\n\n### pre-commit hook\n\nTo use `enforce_notebook_run_order` as a pre-commit hook, add the\nfollowing to your `.pre-commit-config.yaml`:\n\n``` {.sourceCode .yaml}\nrepos:\n- repo: https://github.com/christopher-hacker/enforce-notebook-run-order\n rev: 1.7.0\n hooks:\n - id: enforce-notebook-run-order\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Don't let notebook cells run out of order",
"version": "2.0.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e040ff26614d99352a886d5ff6a12cae84e0f4b8cf2a2cc69fbb7fc2898ad0d0",
"md5": "63870f3e9da1804994128df37f72414b",
"sha256": "7554d8f4ec26c45f41c8a5f021edb02e39f8e8adea57adb40a0291ddb76c4bfd"
},
"downloads": -1,
"filename": "enforce_notebook_run_order-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "63870f3e9da1804994128df37f72414b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 5047,
"upload_time": "2024-07-24T21:52:42",
"upload_time_iso_8601": "2024-07-24T21:52:42.433756Z",
"url": "https://files.pythonhosted.org/packages/e0/40/ff26614d99352a886d5ff6a12cae84e0f4b8cf2a2cc69fbb7fc2898ad0d0/enforce_notebook_run_order-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "aff13e9abb99c75e8e17a7305bdde6e1316166f9a505b48513c0cca8795c4bf6",
"md5": "220840d8ad16df24fb3522dc4449c102",
"sha256": "af76a44de976b19dbfa6475e0c94eef6ee54b741f354b742e573773e1d50a579"
},
"downloads": -1,
"filename": "enforce_notebook_run_order-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "220840d8ad16df24fb3522dc4449c102",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 3851,
"upload_time": "2024-07-24T21:52:44",
"upload_time_iso_8601": "2024-07-24T21:52:44.042473Z",
"url": "https://files.pythonhosted.org/packages/af/f1/3e9abb99c75e8e17a7305bdde6e1316166f9a505b48513c0cca8795c4bf6/enforce_notebook_run_order-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-24 21:52:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "enforce-notebook-run-order"
}