.. _how_to_release:

==================================================
How to make a release
==================================================

Clone the code::

    ssh projects@pylearn.org
    hg clone http://hg.assembla.com/theano Theano-0.X

Edit ``setup.py`` to contain the newest version number ::

    cd Theano-0.X
    vi setup.py     # Edit the MAJOR, MINOR, MICRO and SUFFIX

``conf.py`` in the ``doc/`` directory should be updated in the following ways:

 * Change the ``version`` and ``release`` variables to new version number.
 * Change the upper copyright year to the current year if necessary.

Tag the release. The syntax is something like the following::

    hg commit -m"modifications for 0.X release" setup.py doc/conf.py
    hg tag 0.X
    hg push

Now change ``ISRELEASED`` in setup.py to ``True``.

Finally, use setuptools to register and upload the release::

    python setup.py register sdist --formats=gztar,zip upload

Change ``ISRELEASED`` back to ``False``. 

Regenerate the documentation.
