##// END OF EJS Templates
Remove tools/github_stats.py...
M Bussonnier -
Show More
@@ -1,320 +1,305
1 .. _core_developer_guide:
1 .. _core_developer_guide:
2
2
3 =================================
3 =================================
4 Guide for IPython core Developers
4 Guide for IPython core Developers
5 =================================
5 =================================
6
6
7 This guide documents the development of IPython itself. Alternatively,
7 This guide documents the development of IPython itself. Alternatively,
8 developers of third party tools and libraries that use IPython should see the
8 developers of third party tools and libraries that use IPython should see the
9 :doc:`../development/index`.
9 :doc:`../development/index`.
10
10
11
11
12 For instructions on how to make a developer install see :ref:`devinstall`.
12 For instructions on how to make a developer install see :ref:`devinstall`.
13
13
14 Backporting Pull requests
14 Backporting Pull requests
15 =========================
15 =========================
16
16
17 All pull requests should usually be made against ``main``, if a Pull Request
17 All pull requests should usually be made against ``main``, if a Pull Request
18 need to be backported to an earlier release; then it should be tagged with the
18 need to be backported to an earlier release; then it should be tagged with the
19 correct ``milestone``.
19 correct ``milestone``.
20
20
21 If you tag a pull request with a milestone **before** merging the pull request,
21 If you tag a pull request with a milestone **before** merging the pull request,
22 and the base ref is ``main``, then our backport bot should automatically create
22 and the base ref is ``main``, then our backport bot should automatically create
23 a corresponding pull-request that backport on the correct branch.
23 a corresponding pull-request that backport on the correct branch.
24
24
25 If you have write access to the IPython repository you can also just mention the
25 If you have write access to the IPython repository you can also just mention the
26 **backport bot** to do the work for you. The bot is evolving so instructions may
26 **backport bot** to do the work for you. The bot is evolving so instructions may
27 be different. At the time of this writing you can use::
27 be different. At the time of this writing you can use::
28
28
29 @meeseeksdev[bot] backport [to] <branchname>
29 @meeseeksdev[bot] backport [to] <branchname>
30
30
31 The bot will attempt to backport the current pull-request and issue a PR if
31 The bot will attempt to backport the current pull-request and issue a PR if
32 possible.
32 possible.
33
33
34 .. note::
34 .. note::
35
35
36 The ``@`` and ``[bot]`` when mentioning the bot should be optional and can
36 The ``@`` and ``[bot]`` when mentioning the bot should be optional and can
37 be omitted.
37 be omitted.
38
38
39 If the pull request cannot be automatically backported, the bot should tell you
39 If the pull request cannot be automatically backported, the bot should tell you
40 so on the PR and apply a "Need manual backport" tag to the origin PR.
40 so on the PR and apply a "Need manual backport" tag to the origin PR.
41
41
42 .. _release_process:
42 .. _release_process:
43
43
44 IPython release process
44 IPython release process
45 =======================
45 =======================
46
46
47 This document contains the process that is used to create an IPython release.
47 This document contains the process that is used to create an IPython release.
48
48
49 Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython``
49 Conveniently, the ``release`` script in the ``tools`` directory of the ``IPython``
50 repository automates most of the release process. This document serves as a
50 repository automates most of the release process. This document serves as a
51 handy reminder and checklist for the release manager.
51 handy reminder and checklist for the release manager.
52
52
53 During the release process, you might need the extra following dependencies:
53 During the release process, you might need the extra following dependencies:
54
54
55 - ``keyring`` to access your GitHub authentication tokens
55 - ``keyring`` to access your GitHub authentication tokens
56 - ``graphviz`` to generate some graphs in the documentation
56 - ``graphviz`` to generate some graphs in the documentation
57 - ``ghpro`` to generate the stats
57 - ``ghpro`` to generate the stats
58
58
59 Make sure you have all the required dependencies to run the tests as well.
59 Make sure you have all the required dependencies to run the tests as well.
60
60
61 You can try to ``source tools/release_helper.sh`` when releasing via bash, it
61 You can try to ``source tools/release_helper.sh`` when releasing via bash, it
62 should guide you through most of the process.
62 should guide you through most of the process.
63
63
64
64
65 1. Set Environment variables
65 1. Set Environment variables
66 ----------------------------
66 ----------------------------
67
67
68 Set environment variables to document previous release tag, current
68 Set environment variables to document previous release tag, current
69 release milestone, current release version, and git tag.
69 release milestone, current release version, and git tag.
70
70
71 These variables may be used later to copy/paste as answers to the script
71 These variables may be used later to copy/paste as answers to the script
72 questions instead of typing the appropriate command when the time comes. These
72 questions instead of typing the appropriate command when the time comes. These
73 variables are not used by the scripts directly; therefore, there is no need to
73 variables are not used by the scripts directly; therefore, there is no need to
74 ``export`` them. The format for bash is as follows, but note that these values
74 ``export`` them. The format for bash is as follows, but note that these values
75 are just an example valid only for the 5.0 release; you'll need to update them
75 are just an example valid only for the 5.0 release; you'll need to update them
76 for the release you are actually making::
76 for the release you are actually making::
77
77
78 PREV_RELEASE=4.2.1
78 PREV_RELEASE=4.2.1
79 MILESTONE=5.0
79 MILESTONE=5.0
80 VERSION=5.0.0
80 VERSION=5.0.0
81 BRANCH=main
81 BRANCH=main
82
82
83 For `reproducibility of builds <https://reproducible-builds.org/specs/source-date-epoch/>`_,
83 For `reproducibility of builds <https://reproducible-builds.org/specs/source-date-epoch/>`_,
84 we recommend setting ``SOURCE_DATE_EPOCH`` prior to running the build; record the used value
84 we recommend setting ``SOURCE_DATE_EPOCH`` prior to running the build; record the used value
85 of ``SOURCE_DATE_EPOCH`` as it may not be available from build artifact. You
85 of ``SOURCE_DATE_EPOCH`` as it may not be available from build artifact. You
86 should be able to use ``date +%s`` to get a formatted timestamp::
86 should be able to use ``date +%s`` to get a formatted timestamp::
87
87
88 SOURCE_DATE_EPOCH=$(date +%s)
88 SOURCE_DATE_EPOCH=$(date +%s)
89
89
90
90
91 2. Create GitHub stats and finish release note
91 2. Create GitHub stats and finish release note
92 ----------------------------------------------
92 ----------------------------------------------
93
93
94 .. note::
94 .. note::
95
95
96 This step is optional if making a Beta or RC release.
96 This step is optional if making a Beta or RC release.
97
97
98 .. note::
98 .. note::
99
99
100 Before generating the GitHub stats, verify that all closed issues and pull
100 Before generating the GitHub stats, verify that all closed issues and pull
101 requests have `appropriate milestones
101 requests have `appropriate milestones
102 <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_.
102 <https://github.com/ipython/ipython/wiki/Dev:-GitHub-workflow#milestones>`_.
103 `This search
103 `This search
104 <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
104 <https://github.com/ipython/ipython/issues?q=is%3Aclosed+no%3Amilestone+is%3Aissue>`_
105 should return no results before creating the GitHub stats.
105 should return no results before creating the GitHub stats.
106
106
107 If a major release:
107 If a major release:
108
108
109 - merge any pull request notes into what's new::
109 - merge any pull request notes into what's new::
110
110
111 python tools/update_whatsnew.py
111 python tools/update_whatsnew.py
112
112
113 - update ``docs/source/whatsnew/development.rst``, to ensure it covers
113 - update ``docs/source/whatsnew/development.rst``, to ensure it covers
114 the major release features
114 the major release features
115
115
116 - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is
116 - move the contents of ``development.rst`` to ``versionX.rst`` where ``X`` is
117 the numerical release version
117 the numerical release version
118
118
119 - generate summary of GitHub contributions, which can be done with::
120
121 python tools/github_stats.py --milestone $MILESTONE > stats.rst
122
123 which may need some manual cleanup of ``stats.rst``. Add the cleaned
124 ``stats.rst`` results to ``docs/source/whatsnew/github-stats-X.rst``
125 where ``X`` is the numerical release version (don't forget to add it to
126 the git repository as well). If creating a major release, make a new
127 ``github-stats-X.rst`` file; if creating a minor release, the content
128 from ``stats.rst`` may simply be added to the top of an existing
129 ``github-stats-X.rst`` file.
130
131 - Edit ``docs/source/whatsnew/index.rst`` to list the new ``github-stats-X``
132 file you just created.
133
134 - You do not need to temporarily remove the first entry called
119 - You do not need to temporarily remove the first entry called
135 ``development``, nor re-add it after the release, it will automatically be
120 ``development``, nor re-add it after the release, it will automatically be
136 hidden when releasing a stable version of IPython (if ``_version_extra``
121 hidden when releasing a stable version of IPython (if ``_version_extra``
137 in ``release.py`` is an empty string.
122 in ``release.py`` is an empty string.
138
123
139 Make sure that the stats file has a header or it won't be rendered in
124 Make sure that the stats file has a header or it won't be rendered in
140 the final documentation.
125 the final documentation.
141
126
142 To find duplicates and update `.mailmap`, use::
127 To find duplicates and update `.mailmap`, use::
143
128
144 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
129 git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
145
130
146 If a minor release you might need to do some of the above points manually, and
131 If a minor release you might need to do some of the above points manually, and
147 forward port the changes.
132 forward port the changes.
148
133
149 3. Make sure the repository is clean
134 3. Make sure the repository is clean
150 ------------------------------------
135 ------------------------------------
151
136
152 of any file that could be problematic.
137 of any file that could be problematic.
153 Remove all non-tracked files with:
138 Remove all non-tracked files with:
154
139
155 .. code::
140 .. code::
156
141
157 git clean -xfdi
142 git clean -xfdi
158
143
159 This will ask for confirmation before removing all untracked files. Make
144 This will ask for confirmation before removing all untracked files. Make
160 sure the ``dist/`` folder is clean to avoid any stale builds from
145 sure the ``dist/`` folder is clean to avoid any stale builds from
161 previous build attempts.
146 previous build attempts.
162
147
163
148
164 4. Update the release version number
149 4. Update the release version number
165 ------------------------------------
150 ------------------------------------
166
151
167 Edit ``IPython/core/release.py`` to have the current version.
152 Edit ``IPython/core/release.py`` to have the current version.
168
153
169 in particular, update version number and ``_version_extra`` content in
154 in particular, update version number and ``_version_extra`` content in
170 ``IPython/core/release.py``.
155 ``IPython/core/release.py``.
171
156
172 Step 5 will validate your changes automatically, but you might still want to
157 Step 5 will validate your changes automatically, but you might still want to
173 make sure the version number matches pep440.
158 make sure the version number matches pep440.
174
159
175 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
160 In particular, ``rc`` and ``beta`` are not separated by ``.`` or the ``sdist``
176 and ``bdist`` will appear as different releases. For example, a valid version
161 and ``bdist`` will appear as different releases. For example, a valid version
177 number for a release candidate (rc) release is: ``1.3rc1``. Notice that there
162 number for a release candidate (rc) release is: ``1.3rc1``. Notice that there
178 is no separator between the '3' and the 'r'. Check the environment variable
163 is no separator between the '3' and the 'r'. Check the environment variable
179 ``$VERSION`` as well.
164 ``$VERSION`` as well.
180
165
181 You will likely just have to modify/comment/uncomment one of the lines setting
166 You will likely just have to modify/comment/uncomment one of the lines setting
182 ``_version_extra``
167 ``_version_extra``
183
168
184
169
185 5. Run the `tools/build_release` script
170 5. Run the `tools/build_release` script
186 ---------------------------------------
171 ---------------------------------------
187
172
188 Running ``tools/build_release`` does all the file checking and building that
173 Running ``tools/build_release`` does all the file checking and building that
189 the real release script will do. This makes test installations, checks that
174 the real release script will do. This makes test installations, checks that
190 the build procedure runs OK, and tests other steps in the release process.
175 the build procedure runs OK, and tests other steps in the release process.
191
176
192 The ``build_release`` script will in particular verify that the version number
177 The ``build_release`` script will in particular verify that the version number
193 match PEP 440, in order to avoid surprise at the time of build upload.
178 match PEP 440, in order to avoid surprise at the time of build upload.
194
179
195 We encourage creating a test build of the docs as well.
180 We encourage creating a test build of the docs as well.
196
181
197 6. Create and push the new tag
182 6. Create and push the new tag
198 ------------------------------
183 ------------------------------
199
184
200 Commit the changes to release.py::
185 Commit the changes to release.py::
201
186
202 git commit -am "release $VERSION" -S
187 git commit -am "release $VERSION" -S
203 git push origin $BRANCH
188 git push origin $BRANCH
204
189
205 (omit the ``-S`` if you are no signing the package)
190 (omit the ``-S`` if you are no signing the package)
206
191
207 Create and push the tag::
192 Create and push the tag::
208
193
209 git tag -am "release $VERSION" "$VERSION" -s
194 git tag -am "release $VERSION" "$VERSION" -s
210 git push origin $VERSION
195 git push origin $VERSION
211
196
212 (omit the ``-s`` if you are no signing the package)
197 (omit the ``-s`` if you are no signing the package)
213
198
214 Update release.py back to ``x.y-dev`` or ``x.y-maint`` commit and push::
199 Update release.py back to ``x.y-dev`` or ``x.y-maint`` commit and push::
215
200
216 git commit -am "back to development" -S
201 git commit -am "back to development" -S
217 git push origin $BRANCH
202 git push origin $BRANCH
218
203
219 (omit the ``-S`` if you are no signing the package)
204 (omit the ``-S`` if you are no signing the package)
220
205
221 Now checkout the tag we just made::
206 Now checkout the tag we just made::
222
207
223 git checkout $VERSION
208 git checkout $VERSION
224
209
225 7. Run the release script
210 7. Run the release script
226 -------------------------
211 -------------------------
227
212
228 Run the ``release`` script, this step requires having a current wheel, Python
213 Run the ``release`` script, this step requires having a current wheel, Python
229 >=3.4 and Python 2.7.::
214 >=3.4 and Python 2.7.::
230
215
231 ./tools/release
216 ./tools/release
232
217
233 This makes the tarballs and wheels, and puts them under the ``dist/``
218 This makes the tarballs and wheels, and puts them under the ``dist/``
234 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
219 folder. Be sure to test the ``wheels`` and the ``sdist`` locally before
235 uploading them to PyPI. We do not use an universal wheel as each wheel
220 uploading them to PyPI. We do not use an universal wheel as each wheel
236 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
221 installs an ``ipython2`` or ``ipython3`` script, depending on the version of
237 Python it is built for. Using an universal wheel would prevent this.
222 Python it is built for. Using an universal wheel would prevent this.
238
223
239 Check the shasum of files with::
224 Check the shasum of files with::
240
225
241 shasum -a 256 dist/*
226 shasum -a 256 dist/*
242
227
243 and takes notes of them you might need them to update the conda-forge recipes.
228 and takes notes of them you might need them to update the conda-forge recipes.
244 Rerun the command and check the hash have not changed::
229 Rerun the command and check the hash have not changed::
245
230
246 ./tools/release
231 ./tools/release
247 shasum -a 256 dist/*
232 shasum -a 256 dist/*
248
233
249 Use the following to actually upload the result of the build::
234 Use the following to actually upload the result of the build::
250
235
251 ./tools/release upload
236 ./tools/release upload
252
237
253 It should posts them to ``archive.ipython.org`` and to PyPI.
238 It should posts them to ``archive.ipython.org`` and to PyPI.
254
239
255 PyPI/Warehouse will automatically hide previous releases. If you are uploading
240 PyPI/Warehouse will automatically hide previous releases. If you are uploading
256 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
241 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
257
242
258
243
259 8. Draft a short release announcement
244 8. Draft a short release announcement
260 -------------------------------------
245 -------------------------------------
261
246
262 The announcement should include:
247 The announcement should include:
263
248
264 - release highlights
249 - release highlights
265 - a link to the html version of the *What's new* section of the documentation
250 - a link to the html version of the *What's new* section of the documentation
266 - a link to upgrade or installation tips (if necessary)
251 - a link to upgrade or installation tips (if necessary)
267
252
268 Post the announcement to the mailing list and or blog, and link from Twitter.
253 Post the announcement to the mailing list and or blog, and link from Twitter.
269
254
270 .. note::
255 .. note::
271
256
272 If you are doing a RC or Beta, you can likely skip the next steps.
257 If you are doing a RC or Beta, you can likely skip the next steps.
273
258
274 9. Update milestones on GitHub
259 9. Update milestones on GitHub
275 -------------------------------
260 -------------------------------
276
261
277 These steps will bring milestones up to date:
262 These steps will bring milestones up to date:
278
263
279 - close the just released milestone
264 - close the just released milestone
280 - open a new milestone for the next release (x, y+1), if the milestone doesn't
265 - open a new milestone for the next release (x, y+1), if the milestone doesn't
281 exist already
266 exist already
282
267
283 10. Update the IPython website
268 10. Update the IPython website
284 ------------------------------
269 ------------------------------
285
270
286 The IPython website should document the new release:
271 The IPython website should document the new release:
287
272
288 - add release announcement (news, announcements)
273 - add release announcement (news, announcements)
289 - update current version and download links
274 - update current version and download links
290 - update links on the documentation page (especially if a major release)
275 - update links on the documentation page (especially if a major release)
291
276
292 11. Update readthedocs
277 11. Update readthedocs
293 ----------------------
278 ----------------------
294
279
295 Make sure to update readthedocs and set the latest tag as stable, as well as
280 Make sure to update readthedocs and set the latest tag as stable, as well as
296 checking that previous release is still building under its own tag.
281 checking that previous release is still building under its own tag.
297
282
298 12. Update the Conda-Forge feedstock
283 12. Update the Conda-Forge feedstock
299 ------------------------------------
284 ------------------------------------
300
285
301 Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_
286 Follow the instructions on `the repository <https://github.com/conda-forge/ipython-feedstock>`_
302
287
303 13. Celebrate!
288 13. Celebrate!
304 --------------
289 --------------
305
290
306 Celebrate the release and please thank the contributors for their work. Great
291 Celebrate the release and please thank the contributors for their work. Great
307 job!
292 job!
308
293
309
294
310
295
311 Old Documentation
296 Old Documentation
312 =================
297 =================
313
298
314 Out of date documentation is still available and have been kept for archival purposes.
299 Out of date documentation is still available and have been kept for archival purposes.
315
300
316 .. note::
301 .. note::
317
302
318 Developers documentation used to be on the IPython wiki, but are now out of
303 Developers documentation used to be on the IPython wiki, but are now out of
319 date. The wiki is though still available for historical reasons: `Old IPython
304 date. The wiki is though still available for historical reasons: `Old IPython
320 GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_
305 GitHub Wiki. <https://github.com/ipython/ipython/wiki/Dev:-Index>`_
@@ -1,259 +1,237
1 # Simple tool to help for release
1 # Simple tool to help for release
2 # when releasing with bash, simple source it to get asked questions.
2 # when releasing with bash, simple source it to get asked questions.
3
3
4 # misc check before starting
4 # misc check before starting
5 BLACK=$(tput setaf 1)
5 BLACK=$(tput setaf 1)
6 RED=$(tput setaf 1)
6 RED=$(tput setaf 1)
7 GREEN=$(tput setaf 2)
7 GREEN=$(tput setaf 2)
8 YELLOW=$(tput setaf 3)
8 YELLOW=$(tput setaf 3)
9 BLUE=$(tput setaf 4)
9 BLUE=$(tput setaf 4)
10 MAGENTA=$(tput setaf 5)
10 MAGENTA=$(tput setaf 5)
11 CYAN=$(tput setaf 6)
11 CYAN=$(tput setaf 6)
12 WHITE=$(tput setaf 7)
12 WHITE=$(tput setaf 7)
13 NOR=$(tput sgr0)
13 NOR=$(tput sgr0)
14
14
15
15
16 echo "Checking all tools are installed..."
16 echo "Checking all tools are installed..."
17
17
18 python -c 'import keyring'
18 python -c 'import keyring'
19 python -c 'import twine'
19 python -c 'import twine'
20 python -c 'import sphinx'
20 python -c 'import sphinx'
21 python -c 'import sphinx_rtd_theme'
21 python -c 'import sphinx_rtd_theme'
22 python -c 'import pytest'
22 python -c 'import pytest'
23 python -c 'import build'
23 python -c 'import build'
24 # those are necessary fo building the docs
24 # those are necessary fo building the docs
25 echo "Checking imports for docs"
25 echo "Checking imports for docs"
26 python -c 'import numpy'
26 python -c 'import numpy'
27 python -c 'import matplotlib'
27 python -c 'import matplotlib'
28
28
29
29
30
30
31
31
32 echo "Will use $BLUE'$EDITOR'$NOR to edit files when necessary"
32 echo "Will use $BLUE'$EDITOR'$NOR to edit files when necessary"
33 # echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
33 # echo -n "PREV_RELEASE (X.y.z) [$PREV_RELEASE]: "
34 # read input
34 # read input
35 # PREV_RELEASE=${input:-$PREV_RELEASE}
35 # PREV_RELEASE=${input:-$PREV_RELEASE}
36 # echo -n "MILESTONE (X.y) [$MILESTONE]: "
36 # echo -n "MILESTONE (X.y) [$MILESTONE]: "
37 # read input
37 # read input
38 # MILESTONE=${input:-$MILESTONE}
38 # MILESTONE=${input:-$MILESTONE}
39 echo -n "VERSION (X.y.z) [$VERSION]:"
39 echo -n "VERSION (X.y.z) [$VERSION]:"
40 read input
40 read input
41 VERSION=${input:-$VERSION}
41 VERSION=${input:-$VERSION}
42 echo -n "BRANCH (main|X.y) [$BRANCH]:"
42 echo -n "BRANCH (main|X.y) [$BRANCH]:"
43 read input
43 read input
44 BRANCH=${input:-$BRANCH}
44 BRANCH=${input:-$BRANCH}
45
45
46 ask_section(){
46 ask_section(){
47 echo
47 echo
48 echo $BLUE"$1"$NOR
48 echo $BLUE"$1"$NOR
49 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
49 echo -n $GREEN"Press Enter to continue, S to skip: "$NOR
50 if [ "$ZSH_NAME" = "zsh" ] ; then
50 if [ "$ZSH_NAME" = "zsh" ] ; then
51 read -k1 value
51 read -k1 value
52 value=${value%$'\n'}
52 value=${value%$'\n'}
53 else
53 else
54 read -n1 value
54 read -n1 value
55 fi
55 fi
56 if [ -z "$value" ] || [ $value = 'y' ]; then
56 if [ -z "$value" ] || [ $value = 'y' ]; then
57 return 0
57 return 0
58 fi
58 fi
59 return 1
59 return 1
60 }
60 }
61
61
62
62
63 maybe_edit(){
63 maybe_edit(){
64 echo
64 echo
65 echo $BLUE"$1"$NOR
65 echo $BLUE"$1"$NOR
66 echo -n $GREEN"Press ${BLUE}e$GREEN to Edit ${BLUE}$1$GREEN, any other keys to skip: "$NOR
66 echo -n $GREEN"Press ${BLUE}e$GREEN to Edit ${BLUE}$1$GREEN, any other keys to skip: "$NOR
67 if [ "$ZSH_NAME" = "zsh" ] ; then
67 if [ "$ZSH_NAME" = "zsh" ] ; then
68 read -k1 value
68 read -k1 value
69 value=${value%$'\n'}
69 value=${value%$'\n'}
70 else
70 else
71 read -n1 value
71 read -n1 value
72 fi
72 fi
73
73
74 echo
74 echo
75 if [ $value = 'e' ] ; then
75 if [ $value = 'e' ] ; then
76 $=EDITOR $1
76 $=EDITOR $1
77 fi
77 fi
78 }
78 }
79
79
80
80
81
81
82 echo
82 echo
83 if ask_section "Updating what's new with information from docs/source/whatsnew/pr"
83 if ask_section "Updating what's new with information from docs/source/whatsnew/pr"
84 then
84 then
85 python tools/update_whatsnew.py
85 python tools/update_whatsnew.py
86
86
87 echo
87 echo
88 echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
88 echo $BLUE"please move the contents of "docs/source/whatsnew/development.rst" to version-X.rst"$NOR
89 echo $GREEN"Press enter to continue"$NOR
89 echo $GREEN"Press enter to continue"$NOR
90 read
90 read
91 fi
91 fi
92
92
93 # if ask_section "Gen Stats, and authors"
94 # then
95 #
96 # echo
97 # echo $BLUE"here are all the authors that contributed to this release:"$NOR
98 # git log --format="%aN <%aE>" $PREV_RELEASE... | sort -u -f
99 #
100 # echo
101 # echo $BLUE"If you see any duplicates cancel (Ctrl-C), then edit .mailmap."
102 # echo $GREEN"Press enter to continue:"$NOR
103 # read
104 #
105 # echo $BLUE"generating stats"$NOR
106 # python tools/github_stats.py --milestone $MILESTONE > stats.rst
107 #
108 # echo $BLUE"stats.rst files generated."$NOR
109 # echo $GREEN"Please merge it with the right file (github-stats-X.rst) and commit."$NOR
110 # echo $GREEN"press enter to continue."$NOR
111 # read
112 #
113 # fi
114
115 # if ask_section "Generate API difference (using frapuccino)"
93 # if ask_section "Generate API difference (using frapuccino)"
116 # then
94 # then
117 # echo $BLUE"Checking out $PREV_RELEASE"$NOR
95 # echo $BLUE"Checking out $PREV_RELEASE"$NOR
118 # git checkout tags/$PREV_RELEASE
96 # git checkout tags/$PREV_RELEASE
119 # sleep 1
97 # sleep 1
120 # echo $BLUE"Saving API to file $PREV_RELEASE"$NOR
98 # echo $BLUE"Saving API to file $PREV_RELEASE"$NOR
121 # frappuccino IPython IPython.kernel IPython.lib IPython.qt IPython.lib.kernel IPython.html IPython.frontend IPython.external --save IPython-$PREV_RELEASE.json
99 # frappuccino IPython IPython.kernel IPython.lib IPython.qt IPython.lib.kernel IPython.html IPython.frontend IPython.external --save IPython-$PREV_RELEASE.json
122 # echo $BLUE"coming back to $BRANCH"$NOR
100 # echo $BLUE"coming back to $BRANCH"$NOR
123 # git switch $BRANCH
101 # git switch $BRANCH
124 # sleep 1
102 # sleep 1
125 # echo $BLUE"comparing ..."$NOR
103 # echo $BLUE"comparing ..."$NOR
126 # frappuccino IPython IPython.kernel IPython.lib --compare IPython-$PREV_RELEASE.json
104 # frappuccino IPython IPython.kernel IPython.lib --compare IPython-$PREV_RELEASE.json
127 # echo $GREEN"Use the above guideline to write an API changelog ..."$NOR
105 # echo $GREEN"Use the above guideline to write an API changelog ..."$NOR
128 # echo $GREEN"Press any keys to continue"$NOR
106 # echo $GREEN"Press any keys to continue"$NOR
129 # read
107 # read
130 # fi
108 # fi
131
109
132 echo "Cleaning repository"
110 echo "Cleaning repository"
133 git clean -xfdi
111 git clean -xfdi
134
112
135 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
113 echo $GREEN"please update version number in ${RED}IPython/core/release.py${NOR} , Do not commit yet – we'll do it later."$NOR
136 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py${NOR}"
114 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py${NOR}"
137 sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py
115 sed -i bkp -e '/Uncomment/s/^# //g' IPython/core/release.py
138 rm IPython/core/release.pybkp
116 rm IPython/core/release.pybkp
139 git diff | cat
117 git diff | cat
140 maybe_edit IPython/core/release.py
118 maybe_edit IPython/core/release.py
141
119
142 echo $GREEN"Press enter to continue"$NOR
120 echo $GREEN"Press enter to continue"$NOR
143 read
121 read
144
122
145 if ask_section "Build the documentation ?"
123 if ask_section "Build the documentation ?"
146 then
124 then
147 make html -C docs
125 make html -C docs
148 echo
126 echo
149 echo $GREEN"Check the docs, press enter to continue"$NOR
127 echo $GREEN"Check the docs, press enter to continue"$NOR
150 read
128 read
151
129
152 fi
130 fi
153
131
154 if ask_section "Should we commit, tag, push... etc ? "
132 if ask_section "Should we commit, tag, push... etc ? "
155 then
133 then
156 echo
134 echo
157 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
135 echo $BLUE"Let's commit : git commit -am \"release $VERSION\" -S"
158 echo $GREEN"Press enter to commit"$NOR
136 echo $GREEN"Press enter to commit"$NOR
159 read
137 read
160 git commit -am "release $VERSION" -S
138 git commit -am "release $VERSION" -S
161
139
162 echo
140 echo
163 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
141 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
164 echo $GREEN"Make sure you can push"$NOR
142 echo $GREEN"Make sure you can push"$NOR
165 echo $GREEN"Press enter to continue"$NOR
143 echo $GREEN"Press enter to continue"$NOR
166 read
144 read
167 git push origin $BRANCH
145 git push origin $BRANCH
168
146
169 echo
147 echo
170 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
148 echo "Let's tag : git tag -am \"release $VERSION\" \"$VERSION\" -s"
171 echo $GREEN"Press enter to tag commit"$NOR
149 echo $GREEN"Press enter to tag commit"$NOR
172 read
150 read
173 git tag -am "release $VERSION" "$VERSION" -s
151 git tag -am "release $VERSION" "$VERSION" -s
174
152
175 echo
153 echo
176 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
154 echo $BLUE"And push the tag: git push origin \$VERSION ?"$NOR
177 echo $GREEN"Press enter to continue"$NOR
155 echo $GREEN"Press enter to continue"$NOR
178 read
156 read
179 git push origin $VERSION
157 git push origin $VERSION
180
158
181
159
182 echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
160 echo $GREEN"please update version number and back to .dev in ${RED}IPython/core/release.py"
183 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py${NOR}"
161 echo $GREEN"I tried ${RED}sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py${NOR}"
184 sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py
162 sed -i bkp -e '/Uncomment/s/^/# /g' IPython/core/release.py
185 rm IPython/core/release.pybkp
163 rm IPython/core/release.pybkp
186 git diff | cat
164 git diff | cat
187 echo $GREEN"Please bump ${RED}the minor version number${NOR}"
165 echo $GREEN"Please bump ${RED}the minor version number${NOR}"
188 maybe_edit IPython/core/release.py
166 maybe_edit IPython/core/release.py
189 echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
167 echo ${BLUE}"Do not commit yet – we'll do it later."$NOR
190
168
191
169
192 echo $GREEN"Press enter to continue"$NOR
170 echo $GREEN"Press enter to continue"$NOR
193 read
171 read
194
172
195 echo
173 echo
196 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
174 echo "Let's commit : "$BLUE"git commit -am \"back to dev\""$NOR
197 echo $GREEN"Press enter to commit"$NOR
175 echo $GREEN"Press enter to commit"$NOR
198 read
176 read
199 git commit -am "back to dev"
177 git commit -am "back to dev"
200
178
201 echo
179 echo
202 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
180 echo $BLUE"git push origin \$BRANCH ($BRANCH)?"$NOR
203 echo $GREEN"Press enter to continue"$NOR
181 echo $GREEN"Press enter to continue"$NOR
204 read
182 read
205 git push origin $BRANCH
183 git push origin $BRANCH
206
184
207
185
208 echo
186 echo
209 echo $BLUE"let's : git checkout tags/$VERSION"$NOR
187 echo $BLUE"let's : git checkout tags/$VERSION"$NOR
210 echo $GREEN"Press enter to continue"$NOR
188 echo $GREEN"Press enter to continue"$NOR
211 read
189 read
212 git checkout tags/$VERSION
190 git checkout tags/$VERSION
213 fi
191 fi
214
192
215 if ask_section "Should we build and release ?"
193 if ask_section "Should we build and release ?"
216 then
194 then
217
195
218 echo $BLUE"going to set SOURCE_DATE_EPOCH"$NOR
196 echo $BLUE"going to set SOURCE_DATE_EPOCH"$NOR
219 echo $BLUE'export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)'$NOR
197 echo $BLUE'export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)'$NOR
220 echo $GREEN"Press enter to continue"$NOR
198 echo $GREEN"Press enter to continue"$NOR
221 read
199 read
222
200
223 export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
201 export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
224
202
225 echo $BLUE"SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"$NOR
203 echo $BLUE"SOURCE_DATE_EPOCH set to $SOURCE_DATE_EPOCH"$NOR
226 echo $GREEN"Press enter to continue"$NOR
204 echo $GREEN"Press enter to continue"$NOR
227 read
205 read
228
206
229
207
230
208
231 echo
209 echo
232 echo $BLUE"Attempting to build package..."$NOR
210 echo $BLUE"Attempting to build package..."$NOR
233
211
234 tools/build_release
212 tools/build_release
235
213
236
214
237 echo $RED'$ shasum -a 256 dist/*'
215 echo $RED'$ shasum -a 256 dist/*'
238 shasum -a 256 dist/*
216 shasum -a 256 dist/*
239 echo $NOR
217 echo $NOR
240
218
241 echo $BLUE"We are going to rebuild, node the hash above, and compare them to the rebuild"$NOR
219 echo $BLUE"We are going to rebuild, node the hash above, and compare them to the rebuild"$NOR
242 echo $GREEN"Press enter to continue"$NOR
220 echo $GREEN"Press enter to continue"$NOR
243 read
221 read
244
222
245 echo
223 echo
246 echo $BLUE"Attempting to build package..."$NOR
224 echo $BLUE"Attempting to build package..."$NOR
247
225
248 tools/build_release
226 tools/build_release
249
227
250 echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
228 echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
251 echo $RED'$ shasum -a 256 dist/*'
229 echo $RED'$ shasum -a 256 dist/*'
252 shasum -a 256 dist/*
230 shasum -a 256 dist/*
253 echo $NOR
231 echo $NOR
254
232
255 if ask_section "upload packages ?"
233 if ask_section "upload packages ?"
256 then
234 then
257 twine upload --verbose dist/*.tar.gz dist/*.whl
235 twine upload --verbose dist/*.tar.gz dist/*.whl
258 fi
236 fi
259 fi
237 fi
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now