@@ -17,6 +17,8 @@ Before a release
17
17
18
18
1. Update authors table:
19
19
20
+ Create a token on GitHub's page with the following permission: ``read:org ``.
21
+ Run the following script, entering the token in:
20
22
.. prompt :: bash $
21
23
22
24
cd build_tools; make authors; cd ..
@@ -107,34 +109,62 @@ under the ``doc/whats_new/`` folder so PRs that target the next version can
107
109
contribute their changelog entries to this file in parallel to the release
108
110
process.
109
111
110
- Minor version release
111
- ~~~~~~~~~~~~~~~~~~~~~
112
+ Minor version release and bug-fix release
113
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112
114
113
115
The minor releases should include bug fixes and some relevant documentation
114
116
changes only. Any PR resulting in a behavior change which is not a bug fix
115
117
should be excluded.
116
118
117
- First, create a branch, **on your own fork ** (to release e.g. `0.99.3 `):
119
+ - Create a branch, **on your own fork ** (here referred to as `fork `) for the release.
120
+ For instance, to release `1.2.2 ` create the `release-1.2.2 ` branch
121
+ from `main ` with:
122
+
123
+ .. prompt :: bash $
124
+
125
+ git checkout main
126
+ git pull upstream main:main
127
+ git checkout -b release-1.2.2 main
128
+ git push -u fork release-1.2.2:release-1.2.2
129
+
130
+ - Create a PR to the `upstream/1.2.X ` branch (not to `upstream/main `)
131
+ with all the desired changes.
132
+
133
+ - Do not push anything on that branch yet.
134
+
135
+ - Locally rebase `release-1.2.2 ` from the `upstream/1.2.X ` branch using:
136
+
137
+ .. prompt :: bash $
138
+
139
+ git rebase -i upstream/1.2.X
140
+
141
+ This will open an interactive rebase with the `git-rebase-todo ` containing all
142
+ the latest commit on `main `. At this stage, you have to perform
143
+ this interactive rebase with at least someone else (being three people rebasing
144
+ is better not to forget something and to avoid any doubt).
145
+
146
+ - **Do not remove lines but drop commit by replace ** ``pick `` **with ** ``drop ``
118
147
119
- .. prompt :: bash $
148
+ - Commits to pick for bug-fix release *generally * are prefixed with: `FIX `, `CI `,
149
+ `DOC `
120
150
121
- # assuming main and upstream/main are the same
122
- git checkout -b release-0.99.3 main
151
+ - Commits to drop for bug-fix release * generally * are prefixed with: ` FEAT `,
152
+ ` MAINT `, ` ENH `, ` API `
123
153
124
- Then, create a PR **to the ** `scikit-learn/0.99.X ` **branch ** (not to
125
- main!) with all the desired changes:
154
+ - After having dropped or picked commit, **do no exit ** but paste the content
155
+ of the `git-rebase-todo ` message in the PR.
156
+ This file is located at `.git/rebase-merge/git-rebase-todo `).
126
157
127
- .. prompt :: bash $
158
+ - Save and exit, starting the interactive rebase.
128
159
129
- git rebase -i upstream/0.99.X
160
+ - Resolve merge conflicts when they happen.
130
161
131
- Copy the :ref: `release_checklist ` templates in the description of the Pull
132
- Request to track progress.
162
+ - Create a commit reordering the changelog.
133
163
134
- Do not forget to add a commit updating ``sklearn.__version__ ``.
164
+ - Create a commit updating the version number i.e. ``sklearn.__version__ ``.
135
165
136
- It's nice to have a copy of the `` git rebase -i `` log in the PR to help others
137
- understand what's included .
166
+ Copy the :ref: ` release_checklist ` template and paste it in the description of the
167
+ Pull Request to track progress .
138
168
139
169
.. _making_a_release :
140
170
0 commit comments