@@ -118,15 +118,18 @@ Reference Steps
118
118
* [ ] Update the sklearn dev0 version in main branch
119
119
{%- endif %}
120
120
* [ ] Set the version number in the release branch
121
+ * [ ] Generate the changelog in the release branch
121
122
* [ ] Check that the wheels for the release can be built successfully
122
123
* [ ] Merge the PR with `[cd build]` commit message to upload wheels to the staging repo
123
124
* [ ] Upload the wheels and source tarball to https://test.pypi.org
124
125
* [ ] Create tag on the main repo
125
126
* [ ] Confirm bot detected at https://github.com/conda-forge/scikit-learn-feedstock
126
127
and wait for merge
127
128
* [ ] Upload the wheels and source tarball to PyPI
129
+ {%- if key != "rc" %}
128
130
* [ ] Update news and what's new date in main branch
129
131
* [ ] Backport news and what's new date in release branch
132
+ {%- endif %}
130
133
{%- if key == "final" %}
131
134
* [ ] Update symlink for stable in https://github.com/scikit-learn/scikit-learn.github.io
132
135
{%- endif %}
@@ -139,17 +142,62 @@ Reference Steps
139
142
{%- endif %}
140
143
141
144
{% if key == "rc" %}
142
- - Create a PR from `main` and targeting `main` to increment the dev0 `__version__`
143
- variable in `sklearn/__init__.py`. This means while we are in the release
144
- candidate period, the latest stable is two version behind the `main` branch,
145
- instead of one. In this PR targeting `main`, you should also include a new what's
146
- new file under the `doc/whats_new/` directory so that we prepare the
147
- changelog for the next release.
145
+ - Create a PR from `main` and targeting `main` to prepare for the next version. In
146
+ this PR you need to:
147
+
148
+ - Increment the dev0 `__version__` variable in `sklearn/__init__.py`. This means
149
+ that while we are in the release candidate period, the latest stable is two
150
+ versions behind the `main` branch, instead of one.
151
+
152
+ - Include a new what's new file under the `doc/whats_new/` directory. Don't forget
153
+ to add an entry for this new file in `doc/whats_new.rst`.
154
+
155
+ - Change the what's new file to the newly created one in the `filename` field of
156
+ the `tool.towncrier` section in `pyproject.toml`.
157
+
148
158
{% endif %}
149
159
150
160
- In the release branch, change the version number `__version__` in
151
161
`sklearn/__init__.py` to `{{ version_full }}`.
152
162
163
+ - In the release branch, generate the changelog for the incoming version, i.e
164
+ `doc/whats_new/{{ version_short }}.rst`.
165
+ {%- if key == "rc" %}
166
+ During the RC period we want to keep the fragments when we generate the changelog
167
+ because we'll generate it again for the final release, including the changes that
168
+ may happen in between:
169
+
170
+ .. prompt:: bash
171
+
172
+ towncrier build --keep --version {{ version_short}}.0
173
+ {%- else -%}
174
+ For a non RC release, push a commit where you:
175
+
176
+ - generate the changelog, not keeping the fragments.
177
+
178
+ .. prompt:: bash
179
+
180
+ towncrier build --version {{ version_full}}
181
+
182
+ {%- if key == "final" %}
183
+ - link the release highlights example
184
+ {%- endif %}
185
+ - add the list of contributor names. Suppose that the tag of the last release in
186
+ the previous major/minor version is `{{ previous_tag }}`, then you can use the
187
+ following command to retrieve the list of contributor names:
188
+
189
+ .. prompt:: bash
190
+
191
+ git shortlog -s {{ previous_tag }}.. |
192
+ cut -f2- |
193
+ sort --ignore-case |
194
+ tr "\n" ";" |
195
+ sed "s/;/, /g;s/, $//" |
196
+ fold -s
197
+
198
+ Then create a PR targeting the `main` branch and cherry-pick this commit there.
199
+ {%- endif %}
200
+
153
201
- Trigger the wheel builder with the `[cd build]` commit marker. See also the
154
202
`workflow runs of the wheel builder
155
203
<https://github.com/scikit-learn/scikit-learn/actions/workflows/wheels.yml>`_.
@@ -206,6 +254,12 @@ Reference Steps
206
254
https://github.com/conda-forge/scikit-learn-feedstock. If not, submit a PR for the
207
255
release, targeting the `{% if key == "rc" %}rc{% else %}main{% endif %}` branch.
208
256
257
+ {%- if key == "rc" %}
258
+ Make sure to update the PR such that it will be synchronized with the `main`
259
+ branch. In particular, backport migrations that may have been added since the last
260
+ release.
261
+ {% endif %}
262
+
209
263
- Trigger the `PyPI publishing workflow
210
264
<https://github.com/scikit-learn/scikit-learn/actions/workflows/publish_pypi.yml>`_
211
265
again, but this time to upload the artifacts to the real https://pypi.org/. To do
@@ -246,24 +300,6 @@ Reference Steps
246
300
twine upload dist/*
247
301
248
302
{% if key != "rc" %}
249
- - In the `main` branch, edit the corresponding file in the `doc/whats_new` directory
250
- to update the release date
251
- {%- if key == "final" %}, link the release highlights example,{% endif %}
252
- and add the list of contributor names. Suppose that the tag of the last release in
253
- the previous major/minor version is `{{ previous_tag }}`, then you can use the
254
- following command to retrieve the list of contributor names:
255
-
256
- .. prompt:: bash
257
-
258
- git shortlog -s {{ previous_tag }}.. |
259
- cut -f2- |
260
- sort --ignore-case |
261
- tr "\n" ";" |
262
- sed "s/;/, /g;s/, $//" |
263
- fold -s
264
-
265
- Then cherry-pick it in the release branch.
266
-
267
303
- In the `main` branch, edit `doc/templates/index.html` to change the "News" section
268
304
in the landing page, along with the month of the release.
269
305
{%- if key == "final" %}
0 commit comments