Show More
@@ -1,244 +1,246 b'' | |||
|
1 | 1 | .. _release_process: |
|
2 | 2 | |
|
3 | 3 | ======================= |
|
4 | 4 | IPython release process |
|
5 | 5 | ======================= |
|
6 | 6 | |
|
7 | 7 | This document contains the process that is used to create an IPython release. |
|
8 | 8 | |
|
9 | 9 | Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython`` |
|
10 | 10 | repository automates most of the release process. This document serves as a |
|
11 | 11 | handy reminder and checklist for the release manager. |
|
12 | 12 | |
|
13 | 13 | During the release process, you might need the extra following dependencies: |
|
14 | 14 | |
|
15 | 15 | - ``keyring`` to access your GitHub authentication tokens |
|
16 | 16 | - ``graphviz`` to generate some graphs in the documentation |
|
17 | 17 | |
|
18 | 18 | Make sure you have all the required dependencies to run the tests as well. |
|
19 | 19 | |
|
20 | 20 | |
|
21 | 21 | 1. Set Environment variables |
|
22 | 22 | ---------------------------- |
|
23 | 23 | |
|
24 | 24 | Set environment variables to document previous release tag, current |
|
25 | 25 | release milestone, current release version, and git tag. |
|
26 | 26 | |
|
27 | 27 | These variables may be used later to copy/paste as answers to the script |
|
28 | 28 | questions instead of typing the appropriate command when the time comes. These |
|
29 | 29 | variables are not used by the scripts directly; therefore, there is no need to |
|
30 | 30 | ``export`` them. The format for bash is as follows, but note that these values |
|
31 | 31 | are just an example valid only for the 5.0 release; you'll need to update them |
|
32 | 32 | for the release you are actually making:: |
|
33 | 33 | |
|
34 | 34 | PREV_RELEASE=4.2.1 |
|
35 | 35 | MILESTONE=5.0 |
|
36 | 36 | VERSION=5.0.0 |
|
37 | 37 | BRANCH=master |
|
38 | 38 | |
|
39 | 39 | |
|
40 | 40 | 2. Create GitHub stats and finish release note |
|
41 | 41 | ---------------------------------------------- |
|
42 | 42 | |
|
43 | 43 | .. note:: |
|
44 | 44 | |
|
45 | 45 | This step is optional if making a Beta or RC release. |
|
46 | 46 | |
|
47 | 47 | .. note:: |
|
48 | 48 | |
|
49 | 49 | Before generating the GitHub stats, verify that all closed issues and pull |
|
50 | 50 | requests have `appropriate milestones |
|
51 | 51 | <https://github.com/ipython/ipython/wiki/Dev%3A-GitHub-workflow#milestones>`_. |
|
52 | 52 | `This search |
|
53 | 53 | <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_ |
|
54 | 54 | should return no results before creating the GitHub stats. |
|
55 | 55 | |
|
56 | 56 | If a major release: |
|
57 | 57 | |
|
58 | 58 | - merge any pull request notes into what's new:: |
|
59 | 59 | |
|
60 | 60 | python tools/update_whatsnew.py |
|
61 | 61 | |
|
62 | 62 | - update ``docs/source/whatsnew/development.rst``, to ensure it covers |
|
63 | 63 | the major release features |
|
64 | 64 | |
|
65 | 65 | - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is |
|
66 | 66 | the numerical release version |
|
67 | 67 | |
|
68 | 68 | - generate summary of GitHub contributions, which can be done with:: |
|
69 | 69 | |
|
70 | 70 | python tools/github_stats.py --milestone $MILESTONE > stats.rst |
|
71 | 71 | |
|
72 | 72 | which may need some manual cleanup of ``stats.rst``. Add the cleaned |
|
73 | 73 | ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst`` |
|
74 | 74 | where ``X`` is the numerical release version (don't forget to add it to |
|
75 | 75 | the git repo as well). If creating a major release, make a new |
|
76 | 76 | ``github-stats-X.rst`` file; if creating a minor release, the content |
|
77 | 77 | from ``stats.rst`` may simply be added to the top of an existing |
|
78 | 78 | ``github-stats-X.rst`` file. Finally, edit |
|
79 | 79 | ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X`` |
|
80 | 80 | file you just created and remove temporarily the first entry called |
|
81 | 81 | ``development`` (you'll need to add it back after release). |
|
82 | 82 | |
|
83 | 83 | Make sure that the stats file has a header or it won't be rendered in |
|
84 | 84 | the final documentation. |
|
85 | 85 | |
|
86 | 86 | To find duplicates and update `.mailmap`, use:: |
|
87 | 87 | |
|
88 | 88 | git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f |
|
89 | 89 | |
|
90 | 90 | 3. Make sure the repository is clean |
|
91 | 91 | ------------------------------------ |
|
92 | 92 | |
|
93 | 93 | of any file that could be problematic. |
|
94 | 94 | Remove all non-tracked files with: |
|
95 | 95 | |
|
96 | 96 | .. code:: |
|
97 | 97 | |
|
98 | 98 | git clean -xfdi |
|
99 | 99 | |
|
100 | 100 | This will ask for confirmation before removing all untracked files. Make |
|
101 | 101 | sure the ``dist/`` folder is clean to avoid any stale builds from |
|
102 | 102 | previous build attempts. |
|
103 | 103 | |
|
104 | 104 | |
|
105 | 105 | 4. Update the release version number |
|
106 | 106 | ------------------------------------ |
|
107 | 107 | |
|
108 | 108 | Edit ``IPython/core/release.py`` to have the current version. |
|
109 | 109 | |
|
110 | 110 | in particular, update version number and ``_version_extra`` content in |
|
111 | 111 | ``IPython/core/release.py``. |
|
112 | 112 | |
|
113 | 113 | Step 5 will validate your changes automatically, but you might still want to |
|
114 | 114 | make sure the version number matches pep440. |
|
115 | 115 | |
|
116 | 116 | In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist`` |
|
117 | 117 | and ``bdist`` will appear as different releases. For example, a valid version |
|
118 | 118 | number for a release candidate (rc) release is: ``1.3rc1``. Notice that there |
|
119 | 119 | is no separator between the '3' and the 'r'. Check the environment variable |
|
120 | 120 | ``$VERSION`` as well. |
|
121 | 121 | |
|
122 | 122 | You will likely just have to modify/comment/uncomment one of the lines setting |
|
123 | 123 | ``_version_extra`` |
|
124 | 124 | |
|
125 | 125 | |
|
126 | 126 | 5. Run the `tools/build_release` script |
|
127 | 127 | --------------------------------------- |
|
128 | 128 | |
|
129 | 129 | Running ``tools/build_release`` does all the file checking and building that |
|
130 | 130 | the real release script will do. This makes test installations, checks that |
|
131 | 131 | the build procedure runs OK, and tests other steps in the release process. |
|
132 | 132 | |
|
133 | 133 | The ``build_release`` script will in particular verify that the version number |
|
134 | 134 | match PEP 440, in order to avoid surprise at the time of build upload. |
|
135 | 135 | |
|
136 | 136 | We encourage creating a test build of the docs as well. |
|
137 | 137 | |
|
138 | 138 | 6. Create and push the new tag |
|
139 | 139 | ------------------------------ |
|
140 | 140 | |
|
141 | 141 | Commit the changes to release.py:: |
|
142 | 142 | |
|
143 | 143 | git commit -am "release $VERSION" |
|
144 | 144 | git push origin $BRANCH |
|
145 | 145 | |
|
146 | 146 | Create and push the tag:: |
|
147 | 147 | |
|
148 | 148 | git tag -am "release $VERSION" "$VERSION" |
|
149 | 149 | git push origin --tags |
|
150 | 150 | |
|
151 | 151 | Update release.py back to ``x.y-dev`` or ``x.y-maint``, and re-add the |
|
152 | 152 | ``development`` entry in ``docs/source/whatsnew/index.rst`` and push:: |
|
153 | 153 | |
|
154 | 154 | git commit -am "back to development" |
|
155 | 155 | git push origin $BRANCH |
|
156 | 156 | |
|
157 | 157 | 7. Get a fresh clone |
|
158 | 158 | -------------------- |
|
159 | 159 | |
|
160 | 160 | Get a fresh clone of the tag for building the release:: |
|
161 | 161 | |
|
162 | 162 | cd /tmp |
|
163 | 163 | git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION" |
|
164 | 164 | cd ipython |
|
165 | 165 | |
|
166 | 166 | .. note:: |
|
167 | 167 | |
|
168 | 168 | You can aslo cleanup the current working repository with ``git clean -xfdi`` |
|
169 | 169 | |
|
170 | 170 | 8. Run the release script |
|
171 | 171 | ------------------------- |
|
172 | 172 | |
|
173 | 173 | Run the ``release`` script, this step requires having a current wheel, Python |
|
174 | 174 | >=3.4 and Python 2.7.:: |
|
175 | 175 | |
|
176 | 176 | ./tools/release |
|
177 | 177 | |
|
178 | 178 | This makes the tarballs, zipfiles, and wheels, and put them under the ``dist/`` |
|
179 |
folder. Be sure to test the ``wheel`` and the ``sdist`` locally before |
|
|
180 | them to PyPI. | |
|
179 | folder. Be sure to test the ``wheels`` and the ``sdist`` locally before | |
|
180 | uploading them to PyPI. We do not use an universal wheel as each wheel | |
|
181 | installs an ``ipython2`` or ``ipython3`` script, depending on the version of | |
|
182 | Python it is built for. Using an universal wheel would prevent this. | |
|
181 | 183 | |
|
182 | 184 | Use the following to actually upload the result of the build:: |
|
183 | 185 | |
|
184 | 186 | ./tools/release upload |
|
185 | 187 | |
|
186 | 188 | It should posts them to ``archive.ipython.org``. |
|
187 | 189 | |
|
188 | 190 | You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to |
|
189 | 191 | actually upload on PyPI. Unlike setuptools, twine is able to upload packages |
|
190 | 192 | over SSL. |
|
191 | 193 | |
|
192 | 194 | twine upload dist/* |
|
193 | 195 | |
|
194 | 196 | |
|
195 | 197 | PyPI/Warehouse will automatically hide previous releases. If you are uploading |
|
196 | 198 | a non-stable version, make sure to log-in to PyPI and un-hide previous version. |
|
197 | 199 | |
|
198 | 200 | |
|
199 | 201 | 9. Draft a short release announcement |
|
200 | 202 | ------------------------------------- |
|
201 | 203 | |
|
202 | 204 | The announcement should include: |
|
203 | 205 | |
|
204 | 206 | - release highlights |
|
205 | 207 | - a link to the html version of the *What's new* section of the documentation |
|
206 | 208 | - a link to upgrade or installation tips (if necessary) |
|
207 | 209 | |
|
208 | 210 | Post the announcement to the mailing list and or blog, and link from Twitter. |
|
209 | 211 | |
|
210 | 212 | .. note:: |
|
211 | 213 | |
|
212 | 214 | If you are doing a RC or Beta, you can likely skip the next steps. |
|
213 | 215 | |
|
214 | 216 | 10. Update milestones on GitHub |
|
215 | 217 | ------------------------------- |
|
216 | 218 | |
|
217 | 219 | These steps will bring milestones up to date: |
|
218 | 220 | |
|
219 | 221 | - close the just released milestone |
|
220 | 222 | - open a new milestone for the next release (x, y+1), if the milestone doesn't |
|
221 | 223 | exist already |
|
222 | 224 | |
|
223 | 225 | 11. Update the IPython website |
|
224 | 226 | ------------------------------ |
|
225 | 227 | |
|
226 | 228 | The IPython website should document the new release: |
|
227 | 229 | |
|
228 | 230 | - add release announcement (news, announcements) |
|
229 | 231 | - update current version and download links |
|
230 | 232 | - update links on the documentation page (especially if a major release) |
|
231 | 233 | |
|
232 | 234 | 12. Update readthedocs |
|
233 | 235 | ---------------------- |
|
234 | 236 | |
|
235 | 237 | Make sure to update readthedocs and set the latest tag as stable, as well as |
|
236 | 238 | checking that previous release is still building under its own tag. |
|
237 | 239 | |
|
238 | 240 | |
|
239 | 241 | 13. Celebrate! |
|
240 | 242 | -------------- |
|
241 | 243 | |
|
242 | 244 | Celebrate the release and please thank the contributors for their work. Great |
|
243 | 245 | job! |
|
244 | 246 |
General Comments 0
You need to be logged in to leave comments.
Login now