Skip to main content

Notebook-friendly approval testing for Python and Jupyter

Project description

nbapproval

Notebook-friendly approval testing for Python and Jupyter.

nbapproval lets you compare actual notebook outputs to approved values, store approvals in a separate approvals notebook, and fail CI runs when approvals are missing or mismatched.

Install

pip install nbapproval

Quick Start

from nbapproval import approval_test

approval_test(
    test_id="example.simple",
    description="Simple approval check",
    actual={"value": 42},
)

approval_test.assert_all_approved()

Notes

  • Stable and unique test_id values are required.
  • For deterministic CI runs, configure an explicit approvals notebook path.
  • Works well with Papermill-driven notebook execution.

License

Apache License 2.0. See LICENSE.

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

nbapproval-0.2.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

nbapproval-0.2.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file nbapproval-0.2.0.tar.gz.

File metadata

  • Download URL: nbapproval-0.2.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nbapproval-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e308d0761124c4c82fadccf5b650bb5a032cd552b778ed79c5d4eeebd6cd32b3
MD5 ba71947aad457829433f1e154f7dd1dd
BLAKE2b-256 2531f000fe23124623b743d9714fcd78029d9fc940f93942e2edf7095deb7763

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbapproval-0.2.0.tar.gz:

Publisher: publish.yml on wiki3-ai/nbapproval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbapproval-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nbapproval-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nbapproval-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eba1baa5ff7ee92e7fe62f7e05387e45f0c138d13b2a4129cabee29faf3131b5
MD5 df5caa78b1fec7b944647365c8a0b8fb
BLAKE2b-256 682c080f5b21e23214ba3f61a75c465f1176129ab65bed9e1550b6111a4ae52b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbapproval-0.2.0-py3-none-any.whl:

Publisher: publish.yml on wiki3-ai/nbapproval

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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