From df32201009cd6ef1e3ad7a654c8183e78e76bc22 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Fri, 11 Dec 2015 18:32:19 +0100 Subject: [PATCH 1/5] Add release instructions --- docs/source/development_js.rst | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/source/development_js.rst b/docs/source/development_js.rst index 0997b42f9..b61f0564c 100644 --- a/docs/source/development_js.rst +++ b/docs/source/development_js.rst @@ -27,3 +27,43 @@ the bundled and minified Javacript by using the option number of requests that the browser make to the server, but can allow to test Javascript file modification without going through the compilation step that can take up to 30 sec. + + +Making a notebook release +------------------------- + +Make sure you have followed the step above and have all the tools to genereate +the minified javascript and css files. + +Make sure the repository is clean of any file that could be problematic. +You can remove all non-tracked files with: + +.. code:: + + $ git clean -xfdi + +This would ask you for confirmation before removing all untracked file. Make +sure the ``dist/`` folder in particular is clean and avoid stale build from +previous attempts. + +Run the following two commands to generate the universal ``wheel`` and the ``sdist``: + +.. code:: + + $ python setup.py sdist + $ python setup.py bdist_wheel --universal + +.. note:: + + The above command will modify (at least) the following file : + ``notebook/static/base/js/namespace.js`` to make the notebook version + availlable from javascript. + + +You can now test the ``wheel`` and the ``sdist`` locally before uploading to PyPI. +Make sure to use twine to upload the archives over SSL. + +.. code:: + + $ twine upload dist/* + From 1ec3f5eeeb9de6be5d8abfc33a2f55cc88d1e495 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Fri, 11 Dec 2015 18:41:21 +0100 Subject: [PATCH 2/5] remove universal --- docs/source/development_js.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/development_js.rst b/docs/source/development_js.rst index b61f0564c..4985caf74 100644 --- a/docs/source/development_js.rst +++ b/docs/source/development_js.rst @@ -51,7 +51,7 @@ Run the following two commands to generate the universal ``wheel`` and the ``sdi .. code:: $ python setup.py sdist - $ python setup.py bdist_wheel --universal + $ python setup.py bdist_wheel .. note:: From c7c9cec592389f2427d85a95a1ea8a864d40ea4d Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Fri, 11 Dec 2015 18:42:02 +0100 Subject: [PATCH 3/5] "Available" has only one "l" --- docs/source/development_js.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/development_js.rst b/docs/source/development_js.rst index 4985caf74..64ed8531f 100644 --- a/docs/source/development_js.rst +++ b/docs/source/development_js.rst @@ -57,7 +57,7 @@ Run the following two commands to generate the universal ``wheel`` and the ``sdi The above command will modify (at least) the following file : ``notebook/static/base/js/namespace.js`` to make the notebook version - availlable from javascript. + available from javascript. You can now test the ``wheel`` and the ``sdist`` locally before uploading to PyPI. From 11833724ac8ae6f340b4beafdc1327c8b14a5e3c Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Fri, 11 Dec 2015 18:51:41 +0100 Subject: [PATCH 4/5] Update release instructions --- docs/source/development_js.rst | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/source/development_js.rst b/docs/source/development_js.rst index 64ed8531f..19a92a9d4 100644 --- a/docs/source/development_js.rst +++ b/docs/source/development_js.rst @@ -48,16 +48,26 @@ previous attempts. Run the following two commands to generate the universal ``wheel`` and the ``sdist``: +Update version number in ``notebook/_version.py``. + +Run ``$ python setup.py jsversion``. It will modify (at least) +``notebook/static/base/js/namespace.js`` to make the notebook version available +from within JavaScript. + +Commit and tag the with the current version number: + .. code:: - $ python setup.py sdist - $ python setup.py bdist_wheel + git commit -am "release $VERSION" + git tag $VERSION -.. note:: - The above command will modify (at least) the following file : - ``notebook/static/base/js/namespace.js`` to make the notebook version - available from javascript. +You are now ready to build the ``sdist`` and ``wheel``: + +.. code:: + + $ python setup.py sdist + $ python setup.py bdist_wheel You can now test the ``wheel`` and the ``sdist`` locally before uploading to PyPI. From 254c0a23077acad6dd1f3a50749d9a2abb0445b1 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 14 Dec 2015 10:44:08 +0100 Subject: [PATCH 5/5] Fix various comment and spelling --- docs/source/development_js.rst | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/source/development_js.rst b/docs/source/development_js.rst index 19a92a9d4..3d6fc1ce5 100644 --- a/docs/source/development_js.rst +++ b/docs/source/development_js.rst @@ -3,8 +3,8 @@ Installing Javascript machinery =============================== -Running the Notebook from the source code on Github requires some Javascript -tools to build/minify the CSS and Javascript components. We do these steps when +Running the Notebook from the source code on GitHub requires some JavaScript +tools to build/minify the CSS and JavaScript components. We do these steps when making releases, so there's no need for these tools when installing released versions of the Notebook. @@ -14,26 +14,26 @@ install both of these from your package manager. For example, on Ubuntu or Debia sudo apt-get install nodejs-legacy npm -You can then build the Javascript and CSS by running:: +You can then build the JavaScript and CSS by running:: python setup.py css js This will automatically fetch the remaining dependencies (bower, less) and install them in a subdirectory. -For quick iteration on the Notebook's Javascript you can deactivate the use of -the bundled and minified Javacript by using the option +For quick iteration on the Notebook's JavaScript you can deactivate the use of +the bundled and minified JavaScript by using the option ``--NotebookApp.ignore_minified_js=True``. This might though highly increase the number of requests that the browser make to the server, but can allow to test -Javascript file modification without going through the compilation step that +JavaScript file modification without going through the compilation step that can take up to 30 sec. Making a notebook release ------------------------- -Make sure you have followed the step above and have all the tools to genereate -the minified javascript and css files. +Make sure you have followed the step above and have all the tools to generate +the minified JavaScript and CSS files. Make sure the repository is clean of any file that could be problematic. You can remove all non-tracked files with: @@ -42,19 +42,19 @@ You can remove all non-tracked files with: $ git clean -xfdi -This would ask you for confirmation before removing all untracked file. Make -sure the ``dist/`` folder in particular is clean and avoid stale build from +This would ask you for confirmation before removing all untracked files. Make +sure the ``dist/`` folder is clean and avoid stale build from previous attempts. -Run the following two commands to generate the universal ``wheel`` and the ``sdist``: +1. Run the following commands to generate the universal ``wheel`` and the ``sdist``: -Update version number in ``notebook/_version.py``. +2. Update version number in ``notebook/_version.py``. -Run ``$ python setup.py jsversion``. It will modify (at least) +3. Run ``$ python setup.py jsversion``. It will modify (at least) ``notebook/static/base/js/namespace.js`` to make the notebook version available from within JavaScript. -Commit and tag the with the current version number: +4 . Commit and tag the release with the current version number: .. code:: @@ -62,7 +62,7 @@ Commit and tag the with the current version number: git tag $VERSION -You are now ready to build the ``sdist`` and ``wheel``: +5. You are now ready to build the ``sdist`` and ``wheel``: .. code:: @@ -70,8 +70,8 @@ You are now ready to build the ``sdist`` and ``wheel``: $ python setup.py bdist_wheel -You can now test the ``wheel`` and the ``sdist`` locally before uploading to PyPI. -Make sure to use twine to upload the archives over SSL. +6. You can now test the ``wheel`` and the ``sdist`` locally before uploading to PyPI. +Make sure to use `twine `_ to upload the archives over SSL. .. code::