Skip to main content

Generate beautiful, testable documentation with Jupyter Notebooks

Project description

nbdoc

Generate beautiful, testable documentation with Jupyter Notebooks

CI

Install

Note: nbdoc requires python 3.9 or higher

pip install nbdoc

Usage

This library consists of two cli tools as noted below.

Converting Notebooks To Markdown

! nbdoc_build --help
usage: nbdoc_build [-h] [--srcdir SRCDIR] [--force_all FORCE_ALL]
                   [--n_workers N_WORKERS] [--pause PAUSE]

Build the documentation by converting notebooks matching `fname` to html

optional arguments:
  -h, --help             show this help message and exit
  --srcdir SRCDIR        A directory of notebooks to convert to docs
                         recursively, can also be a filename.
  --force_all FORCE_ALL  Rebuild even notebooks that havent changed (default:
                         False)
  --n_workers N_WORKERS  Number of workers to use
  --pause PAUSE          Pause time (in secs) between notebooks to avoid race
                         conditions (default: 0.5)

Testing Notebooks

nbdoc_test is just an alias of nbdev_test_nbs from nbdev, and is a lightweight way to test notebooks.

! nbdoc_test --help
usage: nbdoc_test [-h] [--fname FNAME] [--flags FLAGS] [--n_workers N_WORKERS]
                  [--verbose VERBOSE] [--timing] [--pause PAUSE]

Test in parallel the notebooks matching `fname`, passing along `flags`

optional arguments:
  -h, --help             show this help message and exit
  --fname FNAME          A notebook name or glob to convert
  --flags FLAGS          Space separated list of flags
  --n_workers N_WORKERS  Number of workers to use
  --verbose VERBOSE      Print errors along the way (default: True)
  --timing               Timing each notebook to see the ones are slow (default:
                         False)
  --pause PAUSE          Pause time (in secs) between notebooks to avoid race
                         conditions (default: 0.5)

Documentation

Documentation can be found here.

References

nbdoc is built with nbdev. Furthermore, much of the code in this project is re-purposed from nbdev directly.

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

nbdoc-0.0.21.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

nbdoc-0.0.21-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file nbdoc-0.0.21.tar.gz.

File metadata

  • Download URL: nbdoc-0.0.21.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nbdoc-0.0.21.tar.gz
Algorithm Hash digest
SHA256 ebcbd48a1cac950d55b28f2f01648d5234942aec2941a3eb8097a43e37c41ddb
MD5 3358fe1b3652b2e8b3938884c4b9cf7d
BLAKE2b-256 4172be98f38a87e7765607f4dd2b2c6bec657fd41b451b1ce82cb8a9ad7a4038

See more details on using hashes here.

File details

Details for the file nbdoc-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: nbdoc-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nbdoc-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 269be0e51aedfdecd59609c2bd24411243ab636860ec87cf5b5804cacbc26a70
MD5 bc34ab363f589dd8c8e571f8e6255b3c
BLAKE2b-256 0c6c798ac073dfa0dbad6e94dfe9e0bd46bfea921c970134335adb121bc1b4fe

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