notebook/docs/source/development_release.rst

68 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2016-02-03 00:26:09 +08:00
.. _notebook_release:
Making a Notebook release
2016-02-03 00:26:09 +08:00
=========================
2016-02-03 01:26:31 +08:00
This document guides a contributor through creating a release of the Jupyter
2016-02-03 00:26:09 +08:00
notebook.
Check installed tools
---------------------
Review ``CONTRIBUTING.rst``. Make sure all the tools needed to generate the
2016-02-03 01:26:31 +08:00
minified JavaScript and CSS files are properly installed.
2016-02-03 00:26:09 +08:00
Clean the repository
--------------------
2016-02-03 00:26:09 +08:00
You can remove all non-tracked files with:
2016-02-03 01:26:31 +08:00
.. code:: bash
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
git clean -xfdi
2016-02-03 00:26:09 +08:00
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.
2016-02-03 01:26:31 +08:00
Create the release
------------------
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. Update version number in ``notebook/_version.py``.
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. Run this command:
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
.. code:: bash
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
python setup.py jsversion
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
It will modify (at least) ``notebook/static/base/js/namespace.js`` which
makes the notebook version available from within JavaScript.
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. Commit and tag the release with the current version number:
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
.. code:: bash
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
git commit -am "release $VERSION"
git tag $VERSION
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. You are now ready to build the ``sdist`` and ``wheel``:
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
.. code:: bash
2016-02-03 00:26:09 +08:00
2016-09-01 22:21:41 +08:00
python setup.py sdist
2016-02-03 01:26:31 +08:00
python setup.py bdist_wheel
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. You can now test the ``wheel`` and the ``sdist`` locally before uploading
to PyPI. Make sure to use `twine <https://github.com/pypa/twine>`_ to
upload the archives over SSL.
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
.. code:: bash
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
twine upload dist/*
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. If all went well, change the ``notebook/_version.py`` back adding the
``.dev`` suffix.
2016-02-03 00:26:09 +08:00
2016-02-03 01:26:31 +08:00
#. Push directly on master, not forgetting to push ``--tags`` too.