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