##// END OF EJS Templates
Update release instructions....
Matthias Bussonnier -
Show More
@@ -1,184 +1,189 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 1. Set Environment variables
14 14 ----------------------------
15 15
16 16 Set environment variables to document previous release tag, current
17 17 release milestone, current release version, and git tag::
18 18
19 19 PREV_RELEASE=4.0.0
20 20 MILESTONE=4.1
21 21 VERSION=4.1.0
22 22 BRANCH=master
23 23
24 24 These variables may be used later to copy/paste as answers to the script
25 25 questions instead of typing the appropriate command when the time comes. These
26 26 variables are not used by the scripts directly; therefore, there is no need to
27 27 `export` the variables.
28 28
29 29 2. Create GitHub stats and finish release note
30 30 ----------------------------------------------
31 31
32 32 .. note::
33 33
34 34 Before generating the GitHub stats, verify that all closed issues and
35 35 pull requests have `appropriate milestones <https://github.com/ipython/ipython/wiki/Dev%3A-GitHub-workflow#milestones>`_.
36 36 `This search <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
37 37 should return no results before creating the GitHub stats.
38 38
39 39 If a major release:
40 40
41 41 - merge any pull request notes into what's new::
42 42
43 43 python tools/update_whatsnew.py
44 44
45 45 - update `docs/source/whatsnew/development.rst`, to ensure it covers
46 46 the major release features
47 47 - move the contents of `development.rst` to `versionX.rst` where `X` is
48 48 the numerical release version
49 49 - generate summary of GitHub contributions, which can be done with::
50 50
51 51 python tools/github_stats.py --milestone $MILESTONE > stats.rst
52 52
53 53 which may need some manual cleanup of `stats.rst`. Add the cleaned
54 54 `stats.rst` results to `docs/source/whatsnew/github-stats-X.rst` where
55 55 `X` is the numerical release version. If creating a major release, make
56 56 a new `github-stats-X.rst` file; if creating a minor release, the
57 57 content from `stats.rst` may simply be added to the top of an existing
58 58 `github-stats-X.rst` file.
59 59
60 60 To find duplicates and update `.mailmap`, use::
61 61
62 62 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
63 63
64 64 3. Make sure the repository is clean
65 65 ------------------------------------
66 66
67 67 of any file that could be problematic.
68 68 Remove all non-tracked files with:
69 69
70 70 .. code::
71 71
72 72 git clean -xfdi
73 73
74 74 This will ask for confirmation before removing all untracked files. Make
75 75 sure the ``dist/`` folder is clean to avoid any stale builds from
76 76 previous build attempts.
77 77
78 78
79
80 4. Run the `tools/build_release` script
81 ---------------------------------------
82
83 Running `tools/build_release` does all the file checking and building that
84 the real release script will do. This makes test installations, checks that
85 the build procedure runs OK, and tests other steps in the release process.
86
87 We encourage creating a test build of the docs as well.
88
89 5. Create and push the new tag
90 ------------------------------
79 4. Update the release version number
80 ------------------------------------
91 81
92 82 Edit `IPython/core/release.py` to have the current version.
93 83
94 84 in particular, update version number and ``_version_extra`` content in
95 85 ``IPython/core/release.py``.
96 86
97 87 Make sure the version number matches pep440, in particular, `rc` and `beta` are
98 88 not separated by `.` or the `sdist` and `bdist` will appear as different
99 89 releases. For example, a valid version number for a release candidate (rc)
100 90 release is: ``1.3rc1``. Notice that there is no separator between the '3' and
101 the 'r'.
91 the 'r'. Check the environment variable `$VERSION` as well.
102 92
103 93
94 5. Run the `tools/build_release` script
95 ---------------------------------------
96
97 Running `tools/build_release` does all the file checking and building that
98 the real release script will do. This makes test installations, checks that
99 the build procedure runs OK, and tests other steps in the release process.
100
101 The `build_release` script will in particular verify that the version number
102 match PEP 440, in order to avoid surprise at the time of build upload.
103
104 We encourage creating a test build of the docs as well.
105
106 6. Create and push the new tag
107 ------------------------------
108
104 109 Commit the changes to release.py::
105 110
106 111 git commit -am "release $VERSION"
107 112 git push origin $BRANCH
108 113
109 114 Create and push the tag::
110 115
111 116 git tag -am "release $VERSION" "$VERSION"
112 117 git push origin --tags
113 118
114 119 Update release.py back to `x.y-dev` or `x.y-maint`, and push::
115 120
116 121 git commit -am "back to development"
117 122 git push origin $BRANCH
118 123
119 6. Get a fresh clone
124 7. Get a fresh clone
120 125 --------------------
121 126
122 127 Get a fresh clone of the tag for building the release::
123 128
124 129 cd /tmp
125 130 git clone --depth 1 https://github.com/ipython/ipython.git -b "$VERSION"
126 131
127 7. Run the release script
132 8. Run the release script
128 133 -------------------------
129 134
130 135 Run the `release` script, this step requires having a current wheel, Python >=3.4 and Python 2.7.::
131 136
132 137 cd tools && ./release
133 138
134 139 This makes the tarballs, zipfiles, and wheels, and put them under the `dist/`
135 140 folder. Be sure to test the ``wheel`` and the ``sdist`` locally before uploading
136 141 them to PyPI.
137 142
138 143 Use the following to actually upload the result of the build:
139 144
140 145 ./release upload
141 146
142 147 It should posts them to ``archive.ipython.org`` and registers the release
143 148 with PyPI if you have the various authorisations.
144 149
145 150 You might need to use `twine <https://github.com/pypa/twine>`_ (`twine upload
146 151 dist/*`) manually to actually upload on PyPI. Unlike setuptools, twine is able
147 152 to upload packages over SSL.
148 153
149 154
150 8. Draft a short release announcement
155 9. Draft a short release announcement
151 156 -------------------------------------
152 157
153 158 The announcement should include:
154 159
155 160 - release highlights
156 161 - a link to the html version of the *What's new* section of the documentation
157 162 - a link to upgrade or installation tips (if necessary)
158 163
159 164 Post the announcement to the mailing list and or blog, and link from Twitter.
160 165
161 9. Update milestones on GitHub
162 ------------------------------
166 10. Update milestones on GitHub
167 -------------------------------
163 168
164 169 These steps will bring milestones up to date:
165 170
166 171 - close the just released milestone
167 172 - open a new milestone for the next release (x, y+1), if the milestone doesn't
168 173 exist already
169 174
170 10. Update the IPython website
175 11. Update the IPython website
171 176 ------------------------------
172 177
173 178 The IPython website should document the new release:
174 179
175 180 - add release announcement (news, announcements)
176 181 - update current version and download links
177 182 - update links on the documentation page (especially if a major release)
178 183
179 11. Celebrate!
184 12. Celebrate!
180 185 --------------
181 186
182 187 Celebrate the release and please thank the contributors for their work. Great
183 188 job!
184 189
General Comments 0
You need to be logged in to leave comments. Login now