nbreproduce


Namenbreproduce JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/MridulS/nbreproduce
SummaryReproduce Jupyter Notebooks inside Docker Containers.
upload_time2020-09-21 20:25:13
maintainer
docs_urlNone
authorMridul Seth
requires_python>=3.7
licenseBSD license
keywords nbreproduce
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            nbreproduce
===========
[![PyPI version](https://badge.fury.io/py/nbreproduce.svg)](https://badge.fury.io/py/nbreproduce)

Reproduce Jupyter Notebooks and projects inside Docker Containers (based on [Jupyter Docker-Stacks](https://jupyter-docker-stacks.readthedocs.io) images) using the `nbreproduce` CLI.


* Free software: BSD license
* Documentation: https://econ-ark.github.io/nbreproduce/


Installation:
-------------

```
$ pip install nbreproduce
```

Features:
--------

- Reproduce a Jupyter Notebook (URL or local file) inside a Docker container for consistent builds across all the devices capable of running docker and Python.

- To test the `hello_world.ipynb` example in this repo.
```
$ nbreproduce --url https://github.com/econ-ark/nbreproduce/blob/master/tests/hello_world.ipynb
```
- The `nbreproduce` will create a new Jupyter notebook ending with `filename-reproduce.ipynb` in the same directory which is a copy of the original notebook but executed inside the docker container environment.

- `nbreproduce` requires a special metadata tag (`docker_image`) inside in the Jupyter notebook to find the link to docker image on DockerHub. On the first run of `nbreproduce` with a normal Jupyter notebook it will prompt you to add a docker image tag, these docker images are built on top of [Jupyter Docker-Stacks](https://jupyter-docker-stacks.readthedocs.io). The `hello_world.ipynb` example can run with the `scipy-notebook` standard image. Using the `--docker` flag you can point it towards the right docker image. (Currently only DockerHub imgags are supported)
```
$ nbreproduce --docker jupyter/scipy-notebook:latest hello_world.ipynb
```

- For a Jupyter notebook which already has the metadata tag (`docker_image`), we can directly execute the notebook, kind of like papermill but inside a standardised docker environemnt :)
```
$ nbreproduce hello_world.ipynb
```

- Reproduce entire folders and projects inside a Docker environment (it works by mounting the current directory to the docker container and running a bash file which has all the required steps to reproduce all the content like figures, builiding latex documents, slides, etc).
```
$ nbreproduce --docker econark/econ-ark-notebook do_all.sh

Executing do_all.sh using the econark/econ-ark-notebook environment inside a docker container.
Executing do_all.sh in the current directory /Users/ms/dev/REMARK/REMARKs/CGMPortfolio
....
....
....
```

- The project is in pre alpha developement mode, so things will break. Don't use this in production. The documentation website doesn't exist yet, use `nbreproduce -h` to get a quick desciption of various flags. Feel free to open up any issue for suggestions or submit a PR to fix bugs/implement new features.

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

[Cookiecutter](https://github.com/audreyr/cookiecutter)

[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)


History
=======

0.4.0 (2020-09-22)
------------------

- .dockerimage file let's you add the name of the docker image, it should exist either in the root directory or the reproduce/ directory. 

0.3.0 (2020-09-16)
------------------

- Add --inplace suppport for individual notebooks.

0.2.0 (2020-08-12)
------------------

- Add --live interactive mode.
- Add ability to execute bash scripts.
- Docker SDK.


0.1.0 (2020-06-10)
------------------

- Pre-alpha release to get the ball rolling.
- First release on PyPI.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MridulS/nbreproduce",
    "name": "nbreproduce",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "nbreproduce",
    "author": "Mridul Seth",
    "author_email": "seth.mridul@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3d/33/550f117c35f69baffec41ac117556494b4fd5179bdc34e027ef3cd598d82/nbreproduce-0.4.0.tar.gz",
    "platform": "",
    "description": "nbreproduce\n===========\n[![PyPI version](https://badge.fury.io/py/nbreproduce.svg)](https://badge.fury.io/py/nbreproduce)\n\nReproduce Jupyter Notebooks and projects inside Docker Containers (based on [Jupyter Docker-Stacks](https://jupyter-docker-stacks.readthedocs.io) images) using the `nbreproduce` CLI.\n\n\n* Free software: BSD license\n* Documentation: https://econ-ark.github.io/nbreproduce/\n\n\nInstallation:\n-------------\n\n```\n$ pip install nbreproduce\n```\n\nFeatures:\n--------\n\n- Reproduce a Jupyter Notebook (URL or local file) inside a Docker container for consistent builds across all the devices capable of running docker and Python.\n\n- To test the `hello_world.ipynb` example in this repo.\n```\n$ nbreproduce --url https://github.com/econ-ark/nbreproduce/blob/master/tests/hello_world.ipynb\n```\n- The `nbreproduce` will create a new Jupyter notebook ending with `filename-reproduce.ipynb` in the same directory which is a copy of the original notebook but executed inside the docker container environment.\n\n- `nbreproduce` requires a special metadata tag (`docker_image`) inside in the Jupyter notebook to find the link to docker image on DockerHub. On the first run of `nbreproduce` with a normal Jupyter notebook it will prompt you to add a docker image tag, these docker images are built on top of [Jupyter Docker-Stacks](https://jupyter-docker-stacks.readthedocs.io). The `hello_world.ipynb` example can run with the `scipy-notebook` standard image. Using the `--docker` flag you can point it towards the right docker image. (Currently only DockerHub imgags are supported)\n```\n$ nbreproduce --docker jupyter/scipy-notebook:latest hello_world.ipynb\n```\n\n- For a Jupyter notebook which already has the metadata tag (`docker_image`), we can directly execute the notebook, kind of like papermill but inside a standardised docker environemnt :)\n```\n$ nbreproduce hello_world.ipynb\n```\n\n- Reproduce entire folders and projects inside a Docker environment (it works by mounting the current directory to the docker container and running a bash file which has all the required steps to reproduce all the content like figures, builiding latex documents, slides, etc).\n```\n$ nbreproduce --docker econark/econ-ark-notebook do_all.sh\n\nExecuting do_all.sh using the econark/econ-ark-notebook environment inside a docker container.\nExecuting do_all.sh in the current directory /Users/ms/dev/REMARK/REMARKs/CGMPortfolio\n....\n....\n....\n```\n\n- The project is in pre alpha developement mode, so things will break. Don't use this in production. The documentation website doesn't exist yet, use `nbreproduce -h` to get a quick desciption of various flags. Feel free to open up any issue for suggestions or submit a PR to fix bugs/implement new features.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n[Cookiecutter](https://github.com/audreyr/cookiecutter)\n\n[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)\n\n\nHistory\n=======\n\n0.4.0 (2020-09-22)\n------------------\n\n- .dockerimage file let's you add the name of the docker image, it should exist either in the root directory or the reproduce/ directory. \n\n0.3.0 (2020-09-16)\n------------------\n\n- Add --inplace suppport for individual notebooks.\n\n0.2.0 (2020-08-12)\n------------------\n\n- Add --live interactive mode.\n- Add ability to execute bash scripts.\n- Docker SDK.\n\n\n0.1.0 (2020-06-10)\n------------------\n\n- Pre-alpha release to get the ball rolling.\n- First release on PyPI.\n\n\n",
    "bugtrack_url": null,
    "license": "BSD license",
    "summary": "Reproduce Jupyter Notebooks inside Docker Containers.",
    "version": "0.4.0",
    "split_keywords": [
        "nbreproduce"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "e8bc8553b4fc06a378c53c4d963aa4bc",
                "sha256": "d4f9b1d03e39422a8d3669d95f0236b7a665dc4f6e2c57e1f19423290738d45b"
            },
            "downloads": -1,
            "filename": "nbreproduce-0.4.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e8bc8553b4fc06a378c53c4d963aa4bc",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 8505,
            "upload_time": "2020-09-21T20:25:11",
            "upload_time_iso_8601": "2020-09-21T20:25:11.345114Z",
            "url": "https://files.pythonhosted.org/packages/93/bb/d04acd2838eb06ee314c2adb78a23a6de7ac3f51c547a95600b447c92d8f/nbreproduce-0.4.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "d0765cc9b525e3acc5c289e30b7b4815",
                "sha256": "76d6667de410a5b3ad74006a651f91d6adb1818cf384db79a2e941d21767d1bd"
            },
            "downloads": -1,
            "filename": "nbreproduce-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d0765cc9b525e3acc5c289e30b7b4815",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 97975,
            "upload_time": "2020-09-21T20:25:13",
            "upload_time_iso_8601": "2020-09-21T20:25:13.409199Z",
            "url": "https://files.pythonhosted.org/packages/3d/33/550f117c35f69baffec41ac117556494b4fd5179bdc34e027ef3cd598d82/nbreproduce-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-09-21 20:25:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "MridulS",
    "error": "Could not fetch GitHub repository",
    "lcname": "nbreproduce"
}
        
Elapsed time: 0.14455s