diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ac70a8fd2..342da5963 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,13 @@ Jupytext ChangeLog ================== +1.14.2-dev (2022-10-??) +------------------- + +**Fixed** +- The sample notebooks have been normalized with `nbformat.validator.normalize` ([#1002](https://github.com/mwouts/jupytext/issues/1002)). + + 1.14.1 (2022-07-29) ------------------- diff --git a/tests/notebooks/ipynb_clojure/html-demo.ipynb b/tests/notebooks/ipynb_clojure/html-demo.ipynb index 94f66c7e1..f35d59d1c 100644 --- a/tests/notebooks/ipynb_clojure/html-demo.ipynb +++ b/tests/notebooks/ipynb_clojure/html-demo.ipynb @@ -6,8 +6,7 @@ "source": [ "# Clojupyter Demo\n", "\n", - "This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.", - "\n", + "This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\n", "This notebook demonstrates some of the more advanced features of Clojupyter." ] }, diff --git a/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb b/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb index 4d0bdca4b..6f13f0c2c 100644 --- a/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb +++ b/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb @@ -2,57 +2,61 @@ "cells": [ { "cell_type": "markdown", + "id": "0ce05620", + "metadata": {}, "source": [ "# Example of an OCaml notebook" - ], - "metadata": {} + ] }, { "cell_type": "code", "execution_count": 3, - "source": [ - "let sum x y = x + y" - ], + "id": "5c62301c", + "metadata": {}, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "val sum : int -> int -> int = \n" ] }, + "execution_count": 3, "metadata": {}, - "execution_count": 3 + "output_type": "execute_result" } ], - "metadata": {} + "source": [ + "let sum x y = x + y" + ] }, { "cell_type": "markdown", + "id": "f89c9670", + "metadata": {}, "source": [ "Let's try our function:" - ], - "metadata": {} + ] }, { "cell_type": "code", "execution_count": 4, - "source": [ - "sum 3 4 = 7 + 0" - ], + "id": "d2b696e3", + "metadata": {}, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "- : bool = true\n" ] }, + "execution_count": 4, "metadata": {}, - "execution_count": 4 + "output_type": "execute_result" } ], - "metadata": {} + "source": [ + "sum 3 4 = 7 + 0" + ] } ], "metadata": { @@ -76,4 +80,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/tests/notebooks/ipynb_ps1/powershell.ipynb b/tests/notebooks/ipynb_ps1/powershell.ipynb index d325faf98..206f3464e 100644 --- a/tests/notebooks/ipynb_ps1/powershell.ipynb +++ b/tests/notebooks/ipynb_ps1/powershell.ipynb @@ -1,5 +1,5 @@ { - "cells": [ + "cells": [ { "cell_type": "markdown", "metadata": {}, diff --git a/tests/notebooks/ipynb_py/jupyter.ipynb b/tests/notebooks/ipynb_py/jupyter.ipynb index 08e52ddca..d1c0106c7 100644 --- a/tests/notebooks/ipynb_py/jupyter.ipynb +++ b/tests/notebooks/ipynb_py/jupyter.ipynb @@ -41,7 +41,9 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {"scrolled":true}, + "metadata": { + "scrolled": true + }, "outputs": [ { "data": { diff --git a/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb b/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb index 081e225ef..1fbaecbcc 100644 --- a/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb +++ b/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb @@ -27,7 +27,7 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.1" - }, + }, "widgets": { "state": { "a65a11f142ca44eebc913788d256adcb": { @@ -37,7 +37,7 @@ } ] } - }, + }, "version": "1.2.0" } }, diff --git a/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb b/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb index aef3690d4..7ced4ed6a 100644 --- a/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb +++ b/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb @@ -1,169 +1,167 @@ { - "cells": [ - { - "cell_type": "code", - "source": [ - "param = 4" - ], - "outputs": [], - "execution_count": 1, - "metadata": { - "collapsed": false, - "outputHidden": false, - "inputHidden": false, - "tags": [ - "parameters" - ] - } - }, + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false, + "inputHidden": false, + "outputHidden": false, + "tags": [ + "parameters" + ] + }, + "outputs": [], + "source": [ + "param = 4" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false, + "inputHidden": false, + "outputHidden": false + }, + "outputs": [], + "source": [ + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false, + "inputHidden": false, + "outputHidden": false + }, + "outputs": [ { - "cell_type": "code", - "source": [ - "import pandas as pd" + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
AB
x
x017
x124
\n", + "
" ], - "outputs": [], - "execution_count": 2, - "metadata": { - "collapsed": false, - "outputHidden": false, - "inputHidden": false - } - }, + "text/plain": [ + " A B\n", + "x \n", + "x0 1 7\n", + "x1 2 4" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n", + " index=pd.Index(['x0', 'x1'], name='x'))\n", + "df" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false, + "inputHidden": false, + "outputHidden": false + }, + "outputs": [ { - "cell_type": "code", - "source": [ - "df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n", - " index=pd.Index(['x0', 'x1'], name='x'))\n", - "df" - ], - "outputs": [ - { - "output_type": "execute_result", - "execution_count": 3, - "data": { - "text/plain": [ - " A B\n", - "x \n", - "x0 1 7\n", - "x1 2 4" - ], - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
AB
x
x017
x124
\n", - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": 3, - "metadata": { - "collapsed": false, - "outputHidden": false, - "inputHidden": false - } + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" }, { - "cell_type": "code", - "source": [ - "%matplotlib inline\n", - "df.plot(kind='bar')" - ], - "outputs": [ - { - "output_type": "execute_result", - "execution_count": 5, - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {} - }, - { - "output_type": "display_data", - "data": { - "text/plain": [ - "
" - ], - "image/png": [ - "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEMCAYAAADknlzeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAADWhJREFUeJzt3V+MXHd5xvHn6XqjcYwb4s2AEMuyW6lJFBHhoCHI+VOBaSpTKpCSXmwksIqQ9gJBQEJCzl0QVKW5qEBKVWmFKRHgtYqLo4oAJpJxkEMIWRsXObEjQXDkaVJibwXGJUuS5e3FjFOznvUce8/ZM+/u9yNZ3p05Oue9OPnm+DdnZhwRAgDk8Sd1DwAAuDSEGwCSIdwAkAzhBoB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9dc8GXA6uuAEgGda4ASAZwg0AyRBuAEiGcANAMoQbAJIh3ACQDOEGgGQINwAk83+p4wopHJUYHQAAAABJRU5ErkJggg==\n" - ] - }, - "metadata": {} - } - ], - "execution_count": 5, - "metadata": { - "collapsed": false, - "outputHidden": false, - "inputHidden": false - } - } - ], - "metadata": { - "kernel_info": { - "name": "python3" - }, - "language_info": { - "name": "python", - "version": "3.6.6", - "mimetype": "text/x-python", - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "pygments_lexer": "ipython3", - "nbconvert_exporter": "python", - "file_extension": ".py" - }, - "kernelspec": { - "name": "python3", - "language": "python", - "display_name": "Python 3" - }, - "nteract": { - "version": "0.11.6" + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEMCAYAAADknlzeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAADWhJREFUeJzt3V+MXHd5xvHn6XqjcYwb4s2AEMuyW6lJFBHhoCHI+VOBaSpTKpCSXmwksIqQ9gJBQEJCzl0QVKW5qEBKVWmFKRHgtYqLo4oAJpJxkEMIWRsXObEjQXDkaVJibwXGJUuS5e3FjFOznvUce8/ZM+/u9yNZ3p05Oue9OPnm+DdnZhwRAgDk8Sd1DwAAuDSEGwCSIdwAkAzhBoBkCDcAJEO4ASAZwg0AyRBuAEiGcANAMuuq2Ok111wT4+PjVewaAFalQ4cOnY6IZpFtKwn3+Pi4Zmdnq9g1AKxKtp8rui1LJQCQDOEGgGQINwAkU8kaNwDU4ZVXXlG73db8/Hzdoyyp0WhodHRUw8PDl70Pwg1g1Wi329q4caPGx8dlu+5xLhARmpubU7vd1sTExGXvp+9Sie3rbB85788Z25+67CMCQEXm5+c1MjIykNGWJNsaGRlZ9r8I+l5xR8QzkjZ3Dzok6b8k7V3WUQGgIo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J00UPjGJsz0ZEq+45gF44P+tRZKnkSUl/bnvC9hWSJiX9R7VjAQCW0veKOyJetf1xSfskDUn6SkQ8VflkAICeiiyVKCK+I+k7Fc+C3lh+wiDj/KyBIy54nREAMMB4yzsAJEO4ASAZwg0AyRR6cRIrx/ZVkrap8+7UUOee+X0R8etaBwOWYPuOiHik7jnWEq64B4jt7ZIOS3q3pCslbZD0HkmHus8Bg2hn3QOsNdxVMkC6HxPwrsVX17avlvRERFxbz2RY62wv9aY7S9oaERtWcp61jqWSwWL1+BwYSX9Q78+MAVbK7ZI+JOnsosetzieIYgUR7sHy95IO2/6+/v8TGcck3SHpc7VNBUg/lvS7iHh08RN8oNzKY6lkwNjeJOljkl5S52qmrc7HDbw9Ig7UOBog2zdExNOLHns35+bKItwDyPZRSV+TdL+k9ZL+UVIrIrbUOhjWvEXnZqP7N+fmCuOuksH0LnU+SvdHkn6izi2Bt9Y6EdBx/rn5pDg3a0G4B9Mr6iyVrFfnquaXEfGHekcCJHFuDgTCPZieVOc/jndKuk2dL2jeU+9IgCTOzYHAGvcAst2KiNlFj304Ir5W10yAxLk5KAg3ACTDUgkAJEO4ASAZwg0AyRBuAEiGcGPVs/1O2z+z3bC9wfZTtt9W91zA5eKuEqwJtj+vzhtG1ktqR8Q/1DwScNkIN9YE21eo8+aReUm3RMRCzSMBl42lEqwVmyS9TtJGda68gbS44saa0P0Gl92SJiS9KSI+XvNIwGXjixSw6nW/r/PViNhle0jSj2xvjYj9dc8GXA6uuAEgGda4ASAZwg0AyRBuAEiGcANAMoQbAJIh3ACQDOEGgGQINwAk83+p4wopHJUYHQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" } + ], + "source": [ + "%matplotlib inline\n", + "df.plot(kind='bar')" + ] + } + ], + "metadata": { + "kernel_info": { + "name": "python3" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.6" }, - "nbformat": 4, - "nbformat_minor": 2 -} \ No newline at end of file + "nteract": { + "version": "0.11.6" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb b/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb index 7e9277628..61e86e4d3 100644 --- a/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb +++ b/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb @@ -58,10 +58,10 @@ "pycharm": { "stem_cell": { "cell_type": "raw", - "source": [], "metadata": { "collapsed": false - } + }, + "source": [] } } }, diff --git a/tests/notebooks/ipynb_sos/jupytext_replication.ipynb b/tests/notebooks/ipynb_sos/jupytext_replication.ipynb index bc6f7d1a7..24f00b7d6 100644 --- a/tests/notebooks/ipynb_sos/jupytext_replication.ipynb +++ b/tests/notebooks/ipynb_sos/jupytext_replication.ipynb @@ -143,4 +143,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/tests/test_sample_notebooks_are_normalized.py b/tests/test_sample_notebooks_are_normalized.py new file mode 100644 index 000000000..b12bc0097 --- /dev/null +++ b/tests/test_sample_notebooks_are_normalized.py @@ -0,0 +1,20 @@ +import nbformat +import pytest + +from .utils import list_notebooks + + +@pytest.mark.parametrize("nb_file", list_notebooks("ipynb_all")) +def test_sample_notebooks_are_normalized(nb_file): + nb = nbformat.read(nb_file, as_version=nbformat.current_nbformat) + + changes, normalized_nb = nbformat.validator.normalize(nb) + nbformat.validate(normalized_nb) + + if changes: + with open(nb_file, "w") as fp: + nbformat.write(normalized_nb, fp) + + assert not changes + + nbformat.validate(nb)