Skip to main content

Pytest plugin for releasing notebooks

Project description

nbmake

Pytest plugin for building notebooks into a tested Jupyterbook

Functionality

  1. Implements pytest plugin API to access the Jupyterbook execution runtime
    1. This enables parallelisation with pytest-xdist
  2. Automates generation of Jupyterbook config and table of contents, or lets you provide your own
  3. 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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbmake-0.0.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file nbmake-0.0.1.tar.gz.

File metadata

  • Download URL: nbmake-0.0.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6

File hashes

Hashes for nbmake-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6a0913c967f06b961f360d104779b093454ab84ec51a96aa0b6207d420c2453c
MD5 dc1d80278758c9e0f9adff721d43ac1f
BLAKE2b-256 8dbadfff73f6e3c7f04665637203c95e8908b22b59e68897f0c45692cacccaf3

See more details on using hashes here.

File details

Details for the file nbmake-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nbmake-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6

File hashes

Hashes for nbmake-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5302ba74726208781bef01f05ce6b8386ef724e460085c92885bd954cdb1a8ce
MD5 126c5d619d84c074a7ef7a229fa31af1
BLAKE2b-256 e43080c899739afe97fc15483ee16c36781a232f1d819f8ce8199ab1a502db86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page