[IPython-dev] nosebook: notebooks-as-documentation-as-tests
takowl at gmail.com
Sat Feb 14 19:28:00 EST 2015
Thanks for this, Nicholas - there has been quite a bit of discussion about
having something like doctest for notebooks, so it's great to see an
I imagine the tricky bit will be deciding which bits of output are
changeable and should be ignored. I think doctest recognises three things
that are allowed to vary:
- <foo at 0x4fce2...> reprs
- Python tracebacks
- ... ellipsis to explicitly mark variable sections (this might need an
extra option enabled, I forget)
On 14 February 2015 at 14:55, Nicholas Bollweg <nick.bollweg at gmail.com>
> Just wanted to plug a little nose extension that I've just gotten working:
> nosebook finds notebooks that look like tests, and for each notebook,
> starts a kernel, runs the code cells and compares the output to what was in
> the original notebook. It can be configured to find different notebooks, as
> well as strip out nasty <xyz at 0x1234> bits.
> It's not a full nose/notebook integration, as it lacks lots of features
> like setup and teardown, but should make it easier to keep documentation in
> notebooks fresh with respect to code changes.
> It reuses IPython.kernel.tests.util, which is probably not the best
> long-term solution, as that probably isn't meant as a public API, but it
> was the quickest way to get it up and running. Right now it's not backward
> compatible with IPython 2.x, but that might be added if there is outcry.
> Interested in feedback!
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev