Skip to main content

Utility to check the validity of jupyter notebook files

Project description

Notebook format validation utility

This project is a simple utility wrapper around nbformat to check the validity of notebook files. The utility will return a non zero return code if any of the notebooks has validations errors. This may be useful in pre-commit scripts to detect problematic notebooks.

Usage

Usage: nbcheck [OPTIONS] [PATH]...

  Check notebooks for validation errors

Options:
  -r, --recurse   Recurse to sub directories
  -x, --executed  Fail notebooks with unexecuted code cells
  -v, --verbose   Print validation errors
  --help          Show this message and exit.

The --executed option additionally fails notebooks where any non-empty code cell has no execution count — catching notebooks committed with cleared or never-run outputs. Useful when committed outputs are the published artifact, e.g. notebooks rendered to a docs site without execution.

Example

> nbcheck extras
pass extras/valid-notebook.ipynb
fail extras/broken-notebook.ipynb
fail extras/nbformat-read.ipynb

Installation

You can install the latest version of this module with pip or pipx

pipx install git+ssh://git@github.com/furechan/nbcheck.git

Related Resources

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

nbcheck-0.0.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

nbcheck-0.0.5-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file nbcheck-0.0.5.tar.gz.

File metadata

  • Download URL: nbcheck-0.0.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for nbcheck-0.0.5.tar.gz
Algorithm Hash digest
SHA256 9a21e1f7ad0d673aa23596c8f49262ef561a2d6d07416e7b55a9939dda997735
MD5 3dcfa5bc40bd2ad9f4eb1dd3774f3b56
BLAKE2b-256 2159e4892633201b5f19c100abe54fafffe3c23f23817b68b124d62eb6b25b52

See more details on using hashes here.

File details

Details for the file nbcheck-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: nbcheck-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for nbcheck-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dc5861a824ad008a35fbefddca4e76878e7de18f91a6d1300e68073533afc7b0
MD5 cd801293c51fcc9c9acc72314b8d80b8
BLAKE2b-256 7370bfd00b4a52f06030e328730cbb482a7257b49197a653fb5746f265df6998

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