# Testing jupyter notebooks CI

**URL:** https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599
**Category:** Tooling
**Created:** [September 10, 2019, 10:54am UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599 "2019-09-10T10:54:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)
#### Post date: [September 10, 2019, 10:54am UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599/1 "2019-09-10T10:54:42Z")

</div>

Are there any recommendations/tools to test jupyter notebooks on travis CI?

I plan to use a `Project.toml` to declare all dependencies and then to use the exit code of the command:

```bash
jupyter-nbconvert --to notebook --execute --output foo JuliaIntroduction.ipynb

```

to check for errors.

Are there any examples?  
Thanks a lot.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [September 10, 2019, 11:02am UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599/2 "2019-09-10T11:02:27Z")

</div>

Maybe you can use [https://github.com/stevengj/NBInclude.jl](https://github.com/stevengj/NBInclude.jl) instead?

Or, since I am the author of [Literate.jl](https://github.com/fredrikekre/Literate.jl) I have to suggest this; maybe you don’t have to test notebooks at all, instead write testable Julia source files that you generate notebooks from 🙂

---

<div class="post-metadata">

### Author: ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)
#### Post date: [September 10, 2019, 12:05pm UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599/3 "2019-09-10T12:05:13Z")

</div>

Thank for your suggestion about NBInclude.jl, however I am a bit hesitant to add a new dependency (without removing another dependency 🙂 )

I know about you nice work with [Literate.jl](https://github.com/fredrikekre/Literate.jl), and I am sure that this will work much better with CI and version control. I will consider it for new project as the notebooks are already written.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [September 10, 2019, 12:23pm UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599/4 "2019-09-10T12:23:25Z")

</div>

> [@Alexander-Barth](#):
>
> Thank for your suggestion about NBInclude.jl, however I am a bit hesitant to add a new dependency (without removing another dependency 🙂 )

(NBInclude is a lot more lightweight a dependency than requiring all of of Jupyter to be installed and working, and a lot less likely to break. It hasn’t been updated recently, but that’s because it is so simple that it has required hardly any maintenance — it works fine on Julia 1.2.)

---

<div class="post-metadata">

### Author: ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)
#### Post date: [September 10, 2019, 1:27pm UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599/5 "2019-09-10T13:27:07Z")

</div>

Ok, it was not clear to me that NBInclude.jl does not depend on IJulia which makes it of course very lightweight compared to Jupiter.

---

<div class="post-metadata">

### Author: ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)
#### Post date: [September 10, 2019, 1:33pm UTC](https://discourse.julialang.org/t/testing-jupyter-notebooks-ci/28599/6 "2019-09-10T13:33:08Z")

</div>

If you intend to emulate running the notebooks, make sure to use `softscope=true` option in order to use the IJulia patch for global scope issues.
