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.1.0.tar.gz (16.1 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.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nbapproval-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aa1c3098becd1c4f8682be809c4e9d0364f1f8b133f34c0bf044b270fa6eed71
MD5 d9ebf1eedf7ac2c15ae61e0d5e51437c
BLAKE2b-256 934bd805f4a6a2d2ceb947d79439075efdcd87af39d606e0e0d4aaf9b24151b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbapproval-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: nbapproval-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c9574ce358dc6513d9ee7dad49b2a20fd2a64639893d6ee8ceeed0847dec508
MD5 376d96fe0a5ba954cf40926c55f6f9d7
BLAKE2b-256 e48bc6829e62d54afabe27b3f48d7789103e5c8c61efd0ef93845ffa09f17083

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbapproval-0.1.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