nbdoc
Generate beautiful, testable documentation with Jupyter Notebooks
Install
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 in `srcdir` to markdown
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)
Run and Save Notebooks Inplace
! nbdoc_update -h
usage: nbdoc_update [-h] [--srcdir SRCDIR] [--flags FLAGS]
[--n_workers N_WORKERS] [--pause PAUSE]
Refresh all notebooks in `srcdir` by running them and saving them in place.
optional arguments:
-h, --help show this help message and exit
--srcdir SRCDIR A directory of notebooks to refresh recursively, can
also be a filename.
--flags FLAGS Space separated list of flags (tst_flags in
settings.ini) to NOT ignore while running notebooks.
Otherwise, those cells are ignored.
--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)
Automatically Attach Links To APIs in Backticks
! nbdoc_linkify --help
usage: nbdoc_linkify [-h] [--local] [--md_path MD_PATH]
Convert names in `backticks` in markdown files that have been documented with
nbdoc.showdoc.ShowDoc to appropriate links.
optional arguments:
-h, --help show this help message and exit
--local Whether or not to build an index based on local documents
(default: True)
--md_path MD_PATH Root path to search recursively containing markdown files
to linkify
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.
Metadata
Release files for nbdoc 0.0.82
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nbdoc-0.0.82.tar.gz | 26.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nbdoc-0.0.82-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.8 kB
Release files / nbdoc-0.0.82.tar.gz
| Download URL | nbdoc-0.0.82.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
234b785e710025357d66c90be0bf7d620a7a507786380030d749b1c4c5146600
|
|
BLAKE2b-256 checksum How to use checksums |
113082fbcd41d191d7842d7d641421ec6cb994bbdbb30767af699a2147cd6aad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / nbdoc-0.0.82-py3-none-any.whl
| Download URL | nbdoc-0.0.82-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84f57e0c20b389eb748eb2055d55d5698b2f44fdef455943d396112d26103fb9
|
|
BLAKE2b-256 checksum How to use checksums |
ccb37aa03973805e9d885b9c69021331bdd3ae7d919af6118973768de340c04e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for nbdoc 0.0.82
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.