All Projects → nteract → Testbook

nteract / Testbook

Licence: bsd-3-clause
🧪 📗 Unit test your Jupyter Notebooks the right way

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Testbook

Nbval
A py.test plugin to validate Jupyter notebooks
Stars: ✭ 347 (+137.67%)
Mutual labels:  jupyter-notebook, pytest
emacs-python-pytest
run pytest inside emacs
Stars: ✭ 105 (-28.08%)
Mutual labels:  unit-testing, pytest
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+1404.79%)
Mutual labels:  jupyter-notebook, pytest
Ipytest
Pytest in IPython notebooks.
Stars: ✭ 139 (-4.79%)
Mutual labels:  jupyter-notebook, pytest
Applied Dl 2018
Tel-Aviv Deep Learning Boot-camp: 12 Applied Deep Learning Labs
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Ds production
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Numbapro Examples
Examples of NumbaPro in use.
Stars: ✭ 145 (-0.68%)
Mutual labels:  jupyter-notebook
Python Machine Learning Book
The "Python Machine Learning (1st edition)" book code repository and info resource
Stars: ✭ 11,428 (+7727.4%)
Mutual labels:  jupyter-notebook
Bug Hunting Colab
A Colab For Bug Hunting!
Stars: ✭ 147 (+0.68%)
Mutual labels:  jupyter-notebook
Dpca
An implementation of demixed Principal Component Analysis (a supervised linear dimensionality reduction technique)
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Fantasy Basketball
Scraping statistics, predicting NBA player performance with neural networks and boosting algorithms, and optimising lineups for Draft Kings with genetic algorithm. Capstone Project for Machine Learning Engineer Nanodegree by Udacity.
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Bertem
论文实现(ACL2019):《Matching the Blanks: Distributional Similarity for Relation Learning》
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Deeplearningbookcode Volume1
Python/Jupyter notebooks for Volume 1 of "Deep Learning - From Basics to Practice" by Andrew Glassner
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
100daysofmlcode
My journey to learn and grow in the domain of Machine Learning and Artificial Intelligence by performing the #100DaysofMLCode Challenge.
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Chess Alpha Zero
Chess reinforcement learning by AlphaGo Zero methods.
Stars: ✭ 1,868 (+1179.45%)
Mutual labels:  jupyter-notebook
Deep Learning With Tensorflow Book
深度学习入门开源书,基于TensorFlow 2.0案例实战。Open source Deep Learning book, based on TensorFlow 2.0 framework.
Stars: ✭ 12,105 (+8191.1%)
Mutual labels:  jupyter-notebook
Siamese Networks
Few Shot Learning by Siamese Networks, using Keras.
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Optical Flow Filter
A real time optical flow algorithm implemented on GPU
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Face generator
DCGAN face generator 🧑.
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook
Formation Deep Learning
Supports de formation Deep Learning (diapos et exercices pratiques)
Stars: ✭ 146 (+0%)
Mutual labels:  jupyter-notebook

Build Status image Documentation Status PyPI Python 3.6 Python 3.7 Python 3.8 Code style: black

testbook

testbook is a unit testing framework extension for testing code in Jupyter Notebooks.

Previous attempts at unit testing notebooks involved writing the tests in the notebook itself. However, testbook will allow for unit tests to be run against notebooks in separate test files, hence treating .ipynb files as .py files.

testbook helps you set up conventional unit tests for your Jupyter Notebooks.

Here is an example of a unit test written using testbook

Consider the following code cell in a Jupyter Notebook:

def func(a, b):
   return a + b

You would write a unit test using testbook in a Python file as follows:

import testbook



@testbook.testbook('/path/to/notebook.ipynb', execute=True)
def test_func(tb):
   func = tb.ref("func")

   assert func(1, 2) == 3

Installing testbook

pip install testbook

NOTE: This does not install any kernels for running your notebooks. You'll need to install in the same way you do for running the notebooks normally. Usually this is done with pip install ipykernel

Alternatively if you want all the same dev dependencies and the ipython kernel you can install these dependencies with:

pip install testbook[dev]

Documentation

See readthedocs for more in-depth details.

Development Guide

Read CONTRIBUTING.md for guidelines on how to setup a local development environment and make code changes back to testbook.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].