[Biopython-dev] Jupyter notebook tutorial tests

Tiago Antao tra at popgen.net
Tue Dec 8 16:13:39 UTC 2015


Hi Vincent,

This is great and something we should include.
I find just a minor issue: some cells in the tutorial are made to fail
(to demonstrate a problem).
But that could be sorted out by adding a try/catch with a error
message, so not a big deal.

In any case the nbconvert option would be enough (assuming that nothing
else more elegant works).

Tiago


On Tue, 8 Dec 2015 07:56:43 -0700
Vincent Davis <vincent at vincentdavis.net> wrote:

> Doing a little research on testing notebooks:
> 
> https://github.com/bollwyvl/nosebook
> is not up-to-date, i.e. will not run with jupyter and maybe not with
> python3.5.
> 
> I tested pytest-ipynb, it works but has 2 issues, 1, looks for files
> starting with test_ 2, uses py.test.
> https://pypi.python.org/pypi/pytest-ipynb
> 
> Both of the above projects could possibly be modified to work.
> 
> 
> A very simple option to verify the notebooks run (without error) is
> to just run this command (you can provide a list of notebooks)
> 
> $ jupyter nbconvert --to notebook --execute "02 - Quick Start.ipynb"
> 
> If there is an error it will stop and report the error.
> 
> 
> I am also trying to extract the source and result from a notebook
> (this is easy) and insert them into a doctest. I have parts of this
> working thanks to the python mailing list.
> 
> 
> 
> Vincent Davis
> 720-301-3003



More information about the Biopython-dev mailing list