Skip to main content

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 have notest as your test flag, then tst_flags = notest ignore.

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

nbdev-ignore-0.0.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

nbdev_ignore-0.0.1-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page