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.1.tar.gz
(7.3 kB
view hashes)
Built Distribution
Close
Hashes for nbdev_ignore-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e2d5aba0206d9f0b8982ac76a33095023aab4845b5f79c3c2769647494a104 |
|
MD5 | 890ac1b45090e28dcc3563ceb7d18e82 |
|
BLAKE2b-256 | fe5cffc91c88bd79b8928f4eafc4747c5c8080ea9e824deb4b527c0b9d2dd5c7 |