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.4.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.4-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nbcheck-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f14d6e0c83c3b1135128a78b8f136978f15b36c4c51e1b86bd647e93cebbffdc
MD5 120b02f51b40b90edd1ee8791a6d5c91
BLAKE2b-256 32e5ce7fbf375173961bb54ea209af8a39268a07d9f92eb70a9107a36a71872e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nbcheck-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 763789f791a19afc2cef3a518bcee4a743c27fa065a689a2ec6c8a7f9cda3ed6
MD5 feee288cba7ef8b91d16f356a970f605
BLAKE2b-256 da53622ef211cf3a856ea49556efbae5c0c4d8955dc4bdf6a1bbb9b3fc6befbd

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