jupyter-cache


Namejupyter-cache JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA defined interface for working with a cache of jupyter notebooks.
upload_time2023-11-08 22:12:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords sphinx extension material design web components
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jupyter-cache

[![Github-CI][github-ci]][github-link]
[![Coverage Status][codecov-badge]][codecov-link]
[![Documentation Status][rtd-badge]][rtd-link]
[![Code style: black][black-badge]][black-link]
[![PyPI][pypi-badge]][pypi-link]

A defined interface for working with a cache of jupyter notebooks.

## Why use jupyter-cache?

If you have a number of notebooks whose execution outputs you want to ensure are kept up to date, without having to re-execute them every time (particularly for long running code, or text-based formats that do not store the outputs).

The notebooks must have deterministic execution outputs:

- You use the same environment to run them (e.g. the same installed packages)
- They run no non-deterministic code (e.g. random numbers)
- They do not depend on external resources (e.g. files or network connections) that change over time

For example, it is utilised by [jupyter-book](https://jupyterbook.org/content/execute.html#caching-the-notebook-execution), to allow for fast document re-builds.

## Install

```bash
pip install jupyter-cache
```

For development:

```bash
git clone https://github.com/executablebooks/jupyter-cache
cd jupyter-cache
git checkout develop
pip install -e .[cli,code_style,testing]
```

See the documentation for usage.

## Development

Some desired requirements (not yet all implemented):

- Persistent
- Separates out "edits to content" from "edits to code cells". Cell
  rearranges and code cell changes should require a re-execution. Content changes should not.
- Allow parallel access to notebooks (for execution)
- Store execution statistics/reports
- Store external assets: Notebooks being executed often require external assets: importing scripts/data/etc. These are prepared by the users.
- Store execution artefacts: created during execution
- A transparent and robust cache invalidation: imagine the user updating an external dependency or a Python module, or checking out a different git branch.

## Contributing

jupyter-cache follows the [Executable Book Contribution Guide](https://executablebooks.org/en/latest/contributing.html). We'd love your help!

### Code Style

Code style is tested using [flake8](http://flake8.pycqa.org),
with the configuration set in `.flake8`,
and code formatted with [black](https://github.com/ambv/black).

Installing with `jupyter-cache[code_style]` makes the [pre-commit](https://pre-commit.com/)
package available, which will ensure this style is met before commits are submitted, by reformatting the code
and testing for lint errors.
It can be setup by:

```shell
>> cd jupyter-cache
>> pre-commit install
```

Optionally you can run `black` and `flake8` separately:

```shell
>> black .
>> flake8 .
```

Editors like VS Code also have automatic code reformat utilities, which can adhere to this standard.

[github-ci]: https://github.com/executablebooks/jupyter-cache/workflows/continuous-integration/badge.svg?branch=master
[github-link]: https://github.com/executablebooks/jupyter-cache
[codecov-badge]: https://codecov.io/gh/executablebooks/jupyter-cache/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/executablebooks/jupyter-cache
[rtd-badge]: https://readthedocs.org/projects/jupyter-cache/badge/?version=latest
[rtd-link]: https://jupyter-cache.readthedocs.io/en/latest/?badge=latest
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[pypi-badge]: https://img.shields.io/pypi/v/jupyter-cache.svg
[pypi-link]: https://pypi.org/project/jupyter-cache
[black-link]: https://github.com/ambv/black

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jupyter-cache",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "sphinx extension material design web components",
    "author": null,
    "author_email": "Chris Sewell <chrisj_sewell@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1b/c1/1276395b634228946bca7da7cf410d133511d150524d2a60b06028a860fe/jupyter_cache-1.0.0.tar.gz",
    "platform": null,
    "description": "# jupyter-cache\n\n[![Github-CI][github-ci]][github-link]\n[![Coverage Status][codecov-badge]][codecov-link]\n[![Documentation Status][rtd-badge]][rtd-link]\n[![Code style: black][black-badge]][black-link]\n[![PyPI][pypi-badge]][pypi-link]\n\nA defined interface for working with a cache of jupyter notebooks.\n\n## Why use jupyter-cache?\n\nIf you have a number of notebooks whose execution outputs you want to ensure are kept up to date, without having to re-execute them every time (particularly for long running code, or text-based formats that do not store the outputs).\n\nThe notebooks must have deterministic execution outputs:\n\n- You use the same environment to run them (e.g. the same installed packages)\n- They run no non-deterministic code (e.g. random numbers)\n- They do not depend on external resources (e.g. files or network connections) that change over time\n\nFor example, it is utilised by [jupyter-book](https://jupyterbook.org/content/execute.html#caching-the-notebook-execution), to allow for fast document re-builds.\n\n## Install\n\n```bash\npip install jupyter-cache\n```\n\nFor development:\n\n```bash\ngit clone https://github.com/executablebooks/jupyter-cache\ncd jupyter-cache\ngit checkout develop\npip install -e .[cli,code_style,testing]\n```\n\nSee the documentation for usage.\n\n## Development\n\nSome desired requirements (not yet all implemented):\n\n- Persistent\n- Separates out \"edits to content\" from \"edits to code cells\". Cell\n  rearranges and code cell changes should require a re-execution. Content changes should not.\n- Allow parallel access to notebooks (for execution)\n- Store execution statistics/reports\n- Store external assets: Notebooks being executed often require external assets: importing scripts/data/etc. These are prepared by the users.\n- Store execution artefacts: created during execution\n- A transparent and robust cache invalidation: imagine the user updating an external dependency or a Python module, or checking out a different git branch.\n\n## Contributing\n\njupyter-cache follows the [Executable Book Contribution Guide](https://executablebooks.org/en/latest/contributing.html). We'd love your help!\n\n### Code Style\n\nCode style is tested using [flake8](http://flake8.pycqa.org),\nwith the configuration set in `.flake8`,\nand code formatted with [black](https://github.com/ambv/black).\n\nInstalling with `jupyter-cache[code_style]` makes the [pre-commit](https://pre-commit.com/)\npackage available, which will ensure this style is met before commits are submitted, by reformatting the code\nand testing for lint errors.\nIt can be setup by:\n\n```shell\n>> cd jupyter-cache\n>> pre-commit install\n```\n\nOptionally you can run `black` and `flake8` separately:\n\n```shell\n>> black .\n>> flake8 .\n```\n\nEditors like VS Code also have automatic code reformat utilities, which can adhere to this standard.\n\n[github-ci]: https://github.com/executablebooks/jupyter-cache/workflows/continuous-integration/badge.svg?branch=master\n[github-link]: https://github.com/executablebooks/jupyter-cache\n[codecov-badge]: https://codecov.io/gh/executablebooks/jupyter-cache/branch/master/graph/badge.svg\n[codecov-link]: https://codecov.io/gh/executablebooks/jupyter-cache\n[rtd-badge]: https://readthedocs.org/projects/jupyter-cache/badge/?version=latest\n[rtd-link]: https://jupyter-cache.readthedocs.io/en/latest/?badge=latest\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[pypi-badge]: https://img.shields.io/pypi/v/jupyter-cache.svg\n[pypi-link]: https://pypi.org/project/jupyter-cache\n[black-link]: https://github.com/ambv/black\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A defined interface for working with a cache of jupyter notebooks.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://jupyter-cache.readthedocs.io",
        "Homepage": "https://github.com/executablebooks/jupyter-cache"
    },
    "split_keywords": [
        "sphinx",
        "extension",
        "material",
        "design",
        "web",
        "components"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f82f0bb8eacdd1102a20fecc759fb8ace695b9a1048563499a6dff8fa8da32a7",
                "md5": "71b87b17d8fcb3f51d88d5e6daf92bf1",
                "sha256": "594b1c4e29b488b36547e12477645f489dbdc62cc939b2408df5679f79245078"
            },
            "downloads": -1,
            "filename": "jupyter_cache-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71b87b17d8fcb3f51d88d5e6daf92bf1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 33875,
            "upload_time": "2023-11-08T22:12:29",
            "upload_time_iso_8601": "2023-11-08T22:12:29.771545Z",
            "url": "https://files.pythonhosted.org/packages/f8/2f/0bb8eacdd1102a20fecc759fb8ace695b9a1048563499a6dff8fa8da32a7/jupyter_cache-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1bc11276395b634228946bca7da7cf410d133511d150524d2a60b06028a860fe",
                "md5": "4c23d419c5faff4945fc42893bc2b877",
                "sha256": "d0fa7d7533cd5798198d8889318269a8c1382ed3b22f622c09a9356521f48687"
            },
            "downloads": -1,
            "filename": "jupyter_cache-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4c23d419c5faff4945fc42893bc2b877",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 31968,
            "upload_time": "2023-11-08T22:12:31",
            "upload_time_iso_8601": "2023-11-08T22:12:31.722589Z",
            "url": "https://files.pythonhosted.org/packages/1b/c1/1276395b634228946bca7da7cf410d133511d150524d2a60b06028a860fe/jupyter_cache-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-08 22:12:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "executablebooks",
    "github_project": "jupyter-cache",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "jupyter-cache"
}
        
Elapsed time: 0.13534s