Unit-testing for a collection of jupyter notebooks. testipynb relies on nbconvert to run the notebooks and catches errors so that they are output (with syntax highlighting!) when unit-tests are run.
why?
If you want to share your notebooks and be confident that they _should_ work on someone else’s machine
If you are using notebooks to generate figures in a publication and want to ensure they are reproducible (powerful when connected with cron jobs on travis-ci)
installation
pip install testipynb
usage
import testipynb
NBDIR = '../notebooks'
Test = testipynb.TestNotebooks(directory=NBDIR)
Test.assertTrue(Test.run_tests())
or in a unit-test file:
import testipynb
import unittest
NBDIR = '../notebooks'
Test = testipynb.TestNotebooks(directory=NBDIR, timeout=2100)
TestNotebooks = Test.get_tests()
if __name__ == "__main__":
unittest.main()
connections
testipynb is used in:
If you use testipynb in one of your repositories and would like it listed, please edit this file
Metadata
Release files for testipynb 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| testipynb-0.0.2.tar.gz | 5.9 kB | Details |
Release files / testipynb-0.0.2.tar.gz
| Download URL | testipynb-0.0.2.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a512bfc86a3bf329fbf8fbaa435ef0702dc89893f22398ae08ec5ef89d9bbf5
|
|
BLAKE2b-256 checksum How to use checksums |
57bb9f57e1459e275084c30071ad43913ce2cad5c117c2a499c662bc03cf79a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
|