Skip to main content

Basic notebook checks. Do they run? Do they contain lint?

Project description

See Build Status on Travis CI See Build Status on AppVeyor

nbsmoke

Basic notebook smoke tests: Do they run ok? Do they contain lint?

WARNING: early stage proof of concept; work in progress. Use at your own risk.

In particular, this extension is supposed to handle ipython magics as far as possible, but has not yet been widely tested.


This Pytest plugin was generated with Cookiecutter along with @hackebrot’s Cookiecutter-pytest-plugin template.

Installation

You can install nbsmoke via pip from PyPI:

$ pip install nbsmoke

Or you can install nbsmoke via conda from anaconda.org:

$ conda install -c pyviz/label/dev -c conda-forge nbsmoke

Usage

Check all notebooks in examples/ run without errors:

$ pytest --nbsmoke-run examples/

Check all notebooks in examples/ run without errors, and store html to look at afterwards:

$ pytest --nbsmoke-run --store-html=/scratch examples/

Lint check notebooks in examples/:

$ pytest --nbsmoke-lint notebooks/

Instead of all files in a directory, you can specify a list e.g.:

$ pytest --nbsmoke-run notebooks/Untitled*.ipynb

Additional options are available by standard pytest ‘ini’ configuration in setup.cfg, pytest.ini, or tox.ini:

[pytest]
# when running, seconds allowed per cell (see nbconvert timeout)
cell_timeout = 600

# notebooks to skip running; one case insensitive re to match per line
skip_run = ^.*skipme\.ipynb$
           ^.*skipmetoo.*$

# case insensitive re to match for file to be considered notebook;
# defaults to ``^.*\.ipynb``
it_is_nb_file = ^.*\.something$

Contributing

First, install using pip install -e .. Then run the tests using tox or pytest -v tests/.

New release to PyPI and anaconda.org: git tag -a vX.Y.Z -m "Something about release" && git push --tags.

License

Distributed under the terms of the BSD-3 license, “nbsmoke” is free and open source software.

Issues

If you encounter any problems, please file an issue (ideally including a copy of any problematic notebook).

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

nbsmoke-0.2.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

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

nbsmoke-0.2.0-py2.py3-none-any.whl (14.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nbsmoke-0.2.0.tar.gz.

File metadata

  • Download URL: nbsmoke-0.2.0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nbsmoke-0.2.0.tar.gz
Algorithm Hash digest
SHA256 07d87f4d604f5e04f67d41a9ba6e1567ceccd37d2292457deffb61ca165a54b6
MD5 a02a54c48136dc1c29536dee2ceb218b
BLAKE2b-256 fd36d84e8ebfb9bef8f85a858778ca2de63ee6ae0632506ebd8c8013e8825399

See more details on using hashes here.

File details

Details for the file nbsmoke-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nbsmoke-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d8c65eed5299a91d8c9165b63fe59fe9d6fc13d9759b6b61e1314d7ce98c9469
MD5 4f1e17d24c33b8358ed5cae5e150de0c
BLAKE2b-256 5b29b9593c18693bb71391dd6d27fe41c2bb109e22c2f9100ddc5fecb661283b

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