Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cstjean/NBTesting.jl
Testing for IJulia notebooks
https://github.com/cstjean/NBTesting.jl
Last synced: about 2 months ago
JSON representation
Testing for IJulia notebooks
- Host: GitHub
- URL: https://github.com/cstjean/NBTesting.jl
- Owner: cstjean
- License: other
- Created: 2017-01-26T14:33:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T15:58:23.000Z (over 4 years ago)
- Last Synced: 2024-07-18T12:12:25.680Z (2 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 64.5 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# NBTesting
[![Build Status](https://travis-ci.org/cstjean/NBTesting.jl.svg?branch=master)](https://travis-ci.org/cstjean/NBTesting.jl)
[![Coverage Status](https://coveralls.io/repos/cstjean/NBTesting.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/cstjean/NBTesting.jl?branch=master)
[![codecov.io](http://codecov.io/github/cstjean/NBTesting.jl/coverage.svg?branch=master)](http://codecov.io/github/cstjean/NBTesting.jl?branch=master)
NBTesting is a simple utility for writing tests in your
[IJulia](https://github.com/JuliaLang/IJulia.jl) notebooks, alongside other plots and
computations. How it works:1. [Add tests to your notebook](test/Water_Analysis.ipynb) using `Base.Test`, or your
favorite testing framework.
2. Use `NBTesting.nbtest("Water_Analysis.ipynb")` to run the notebook's code and
tests. It will create and execute a file called
[`NBTest_Water_Analysis.jl`](test/NBTest_Water_Analysis.jl).
3. (Optional) Track this `.jl` file with git if all tests are successful.`nbtest` will mostly run the notebook code as is, but it provides [a few ways to
control which code gets executed when](test/Water_Analysis.ipynb), and a `verbose=...`
option for printing the headers (on by default - see `?nbtest` for details). The code is
wrapped inside a module called `NBTest_[Notebook name]`, to isolate it from the current
environment, and to make it easier to inspect the state of variables if a test fails.NBTesting borrows code from [NBInclude.jl](https://github.com/stevengj/NBInclude.jl), by
Steven G. Johnson.