ipython/ipynb

Validate that our ipynb files are valid

yuvipanda opened this issue · 2 comments

Make sure they're py3 and nbformat 4

I don't think going to validate the json against the Python version is that useful/worth it. First it need to be in a package, which requires a __init__.(py|ipynb), detecting that's it's python 3 is not super trivial as you can name your kernels whatever. Validating that a notebook is indeed v4 is reimplementing nbformat.

We could use nbformat conditionally if installed, and/or provide better hook for python-like languages (hy ?) that want to use notebooks.

My patch just checks kernelspec to see if it is python3, and the nbformat
version specified in the json itself. Not doing any more deeper validation.

On Wed, Nov 9, 2016 at 9:49 AM, Matthias Bussonnier <
notifications@github.com> wrote:

I don't think going to validate the json against the Python version is
that useful/worth it. First it need to be in a package, which requires
a init.(py|ipynb), detecting that's it's python 3 is not super
trivial as you can name your kernels whatever. Validating that a notebook
is indeed v4 is reimplementing nbformat.

We could use nbformat conditionally if installed, and/or provide better
hook for python-like languages (hy ?) that want to use notebooks.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAB23oZXRsrszao7xs2hDs93KdTLiEpiks5q8gfEgaJpZM4KtIpX
.

Yuvi Panda T
http://yuvi.in/blog