File: release_process.rst

package info (click to toggle)
python-simpy3 3.0.11-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,080 kB
  • sloc: python: 2,885; makefile: 138
file content (167 lines) | stat: -rw-r--r-- 4,406 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
===============
Release Process
===============

This process describes the steps to execute in order to release a new version
of SimPy.


Preparations
============

#. Close all `tickets for the next version
   <https://bitbucket.org/simpy/simpy/issues?status=new&status=open>`_.

#. Update the *minium* required versions of dependencies in :file:`setup.py`.
   Update the *exact* version of all entries in :file:`requirements.txt`.

#. Run :command:`tox` from the project root. All tests for all supported
   versions must pass:

   .. code-block:: bash

    $ tox
    [...]
    ________ summary ________
    py27: commands succeeded
    py32: commands succeeded
    py33: commands succeeded
    pypy: commands succeeded
    congratulations :)

   .. note::

    Tox will use the :file:`requirements.txt` to setup the venvs, so make sure
    you've updated it!

#. Build the docs (HTML is enough). Make sure there are no errors and undefined
   references.

   .. code-block:: bash

    $ cd docs/
    $ make clean html
    $ cd ..

#. Check if all authors are listed in :file:`AUTHORS.txt`.

#. Update the change logs (:file:`CHANGES.txt` and
   :file:`docs/about/history.rst`). Only keep changes for the current major
   release in :file:`CHANGES.txt` and reference the history page from there.

#. Commit all changes:

   .. code-block:: bash

    $ hg ci -m 'Updated change log for the upcoming release.'

#. Update the version number in :file:`simpy/__init__.py` and :file:`setup.py`
   and commit:

   .. code-block:: bash

    $ hg ci -m 'Bump version from x.y.z to a.b.c'

   .. warning::

      Do not yet tag and push the changes so that you can safely do a rollback
      if one of the next step fails and you need change something!

#. Write a draft for the announcement mail with a list of changes,
   acknowledgements and installation instructions. Everyone in the team should
   agree with it.


Build and release
=================

#. Test the release process. Build a source distribution and a `wheel
   <https://pypi.python.org/pypi/wheel>`_ package and test them:

   .. code-block:: bash

    $ python setup.py sdist bdist_wheel
    $ ls dist/
    simpy-a.b.c-py2.py3-none-any.whl simpy-a.b.c.tar.gz

   Try installing them:

   .. code-block:: bash

    $ rm -rf /tmp/simpy-sdist  # ensure clean state if ran repeatedly
    $ virtualenv /tmp/simpy-sdist
    $ /tmp/simpy-sdist/bin/pip install dist/simpy-a.b.c.tar.gz

   and

   .. code-block:: bash

    $ rm -rf /tmp/simpy-wheel  # ensure clean state if ran repeatedly
    $ virtualenv /tmp/simpy-wheel
    $ /tmp/simpy-wheel/bin/pip install dist/simpy-a.b.c-py2.py3-none-any.whl

#. Create or check your accounts for the `test server
   <https://testpypi.python.org/pypi>` and `PyPI
   <https://pypi.python.org/pypi>`_. Update your :file:`~/.pypirc` with your
   current credentials:

   .. code-block:: ini

    [distutils]
    index-servers =
        pypi
        test

    [test]
    repository = https://testpypi.python.org/pypi
    username = <your test user name goes here>
    password = <your test password goes here>

    [pypi]
    repository = http://pypi.python.org/pypi
    username = <your production user name goes here>
    password = <your production password goes here>

#. Upload the distributions for the new version to the test server and test the
   installation again:

   .. code-block:: bash

    $ twine upload -r test dist/simpy*a.b.c*
    $ pip install -i https://testpypi.python.org/pypi simpy

#. Check if the package is displayed correctly:
   https://testpypi.python.org/pypi/simpy

#. Finally upload the package to PyPI and test its installation one last time:

   .. code-block:: bash

    $ twine upload -r pypi dist/simpy*a.b.c*
    $ pip install -U simpy

#. Check if the package is displayed correctly:
   https://pypi.python.org/pypi/simpy


Post release
============

#. Push your changes:

   .. code-block:: bash

    $ hg tag a.b.c
    $ hg push ssh://hg@bitbucket.org/simpy/simpy

#. Activate the `documentation build
   <https://readthedocs.org/dashboard/simpy/versions/>`_ for the new version.

#. Send the prepared email to the mailing list and post it on Google+.

#. Update `Wikipedia <http://en.wikipedia.org/wiki/SimPy>`_ entries.

#. Update `Python Wiki
   <https://wiki.python.org/moin/UsefulModules#Scientific>`_

#. Post something to Planet Python (e.g., via Stefan's blog).