add an ignore directive to hide the cell and avoid execution during testing and docs generation in Jupyter notebooks when using nbdev for development.
Project description
Nbdev-ignore
Install
pip install nbdev-ignore
How it works
There’s only one function ignore_
in this module. It’s exactly the
same as the hide_ processor in nbdev
, so that “#| ignore”
serves the same purpose as “#| hide”. For details on how it works, see
.
In order for it to also serve as a test flag, we will need to manually
add it to tst_flags
(see below), as currently there’s no way to plug
it into the nbdev_test
process.
How to use
To enable the #| ignore
directive, in your settings.ini make sure to:
- Add
nbdev_ignore
as a requirement - Add
procs = nbdev_igore.core:ignore_
, where it should point to the exact function being called - Add it to test flags:
tst_flags = ignore
, so that cells with this directive also avoids testing. If you already have other test flags, separate them with space. For example, if you already havenotest
as your test flag, thentst_flags = notest ignore
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nbdev-ignore-0.0.2.tar.gz
(7.3 kB
view hashes)
Built Distribution
Close
Hashes for nbdev_ignore-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 083781bc5e88bbe4998ff6022dc5a8592c37f2133ae51ca19e9a8820b4b8d5c3 |
|
MD5 | 2581e80eba47c5570658dd5cada044b1 |
|
BLAKE2b-256 | c2ed6b4f07f730f2f62b0b87adbd5e5f989d53003728b58e90716f3bf5db358d |