openworm / ChannelWorm

Tools and curated datasets to build quantitative models of C. elegans ion channels
MIT License
12 stars 11 forks source link

Enable testing notebook to be run in CI #102

Closed travs closed 9 years ago

travs commented 9 years ago

@rgerkin What is the best practice for getting iPython notebooks to run as scripts? I want to get this to run on TravisCI, but I'm not sure if I have to install iPython on there or what.

Do you use something like this, or is there an export you usually do or something?

rgerkin commented 9 years ago

@travs nbconvert (part of IPython) can export a notebook to a plain script. So we can either require that a script version of the notebook be committed with each notebook change, or maybe just install ipython in the travis script and have it use nbconvert to export the notebooks.

travs commented 9 years ago

Ok, I'm not too familiar with the ipython infrastructure if you can't tell.

For now I've just exported the script with nbconvert and manually removed the magic function, and wrote a test to make sure it exits with 0 (i.e. it ran).

We can come up with something more sustainable/automated as we start to more heavily modify the notebook(s).