Pytest plugin for releasing notebooks
Project description
nbmake
Pytest plugin for building notebooks into a tested Jupyterbook
Functionality
- Implements pytest plugin API to access the Jupyterbook execution runtime
- This enables parallelisation with
pytest-xdist
- This enables parallelisation with
- Automates generation of Jupyterbook config and table of contents, or lets you provide your own
- Does not interfere with normal jupyter-book usage.
Usage
During Development
pip install pytest nbmake
pytest --nbmake
the output is a Jupyter book in a build directory:
_build/
html/ # contains jupyter book static site with test results
jupyter_execute/ # contains jupyter-book ipynbs
this can be viewed locally for debugging
open _build/html/index.html
Example release process
pytest --nbmake
netlify deploy dir=_build/html
Roadmap
Just some ideas:
Test Isolation
Improve virtualisation of individual tests, e.g. to prevent !pip install
commands contaminating the test environment.
Pytest Fixture Integration
Make notebooks a first-class pytest citizen by providing a mechanism for enabling pytest fixtures
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nbmake-0.0.1.tar.gz
(6.9 kB
view hashes)
Built Distribution
nbmake-0.0.1-py3-none-any.whl
(7.0 kB
view hashes)