Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2eebc5f

Browse filesBrowse files
jjerphanogriselthomasjpfanjeremiedbb
committed
DOC Improve minor and bug-fix release processes documentation (#25457)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com> Co-authored-by: Jérémie du Boisberranger <jeremiedbb@yahoo.fr>
1 parent fab4ba0 commit 2eebc5f
Copy full SHA for 2eebc5f

File tree

1 file changed

+70
-23
lines changed
Filter options

1 file changed

+70
-23
lines changed

‎doc/developers/maintainer.rst

Copy file name to clipboardExpand all lines: doc/developers/maintainer.rst
+70-23Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Before a release
1717

1818
1. Update authors table:
1919

20+
Create a `classic token on GitHub <https://github.com/settings/tokens/new>`_
21+
with the ``read:org`` following permission.
22+
23+
Run the following script, entering the token in:
24+
2025
.. prompt:: bash $
2126

2227
cd build_tools; make authors; cd ..
@@ -43,14 +48,16 @@ Before a release
4348

4449
**Permissions**
4550

46-
The release manager requires a set of permissions on top of the usual
47-
permissions given to maintainers, which includes:
51+
The release manager must be a *maintainer* of the ``scikit-learn/scikit-learn``
52+
repository to be able to publish on ``pypi.org`` and ``test.pypi.org``
53+
(via a manual trigger of a dedicated Github Actions workflow).
54+
55+
The release manager does not need extra permissions on ``pypi.org`` to publish a
56+
release in particular.
4857

49-
- *maintainer* role on ``scikit-learn`` projects on ``pypi.org`` and
50-
``test.pypi.org``, separately.
51-
- become a member of the *scikit-learn* team on conda-forge by editing the
52-
``recipe/meta.yaml`` file on
53-
``https://github.com/conda-forge/scikit-learn-feedstock``
58+
The release manager must be a *maintainer* of the ``conda-forge/scikit-learn-feedstock``
59+
repository. This can be changed by editing the ``recipe/meta.yaml`` file in the
60+
first release pull-request.
5461

5562
.. _preparing_a_release_pr:
5663

@@ -107,34 +114,74 @@ under the ``doc/whats_new/`` folder so PRs that target the next version can
107114
contribute their changelog entries to this file in parallel to the release
108115
process.
109116

110-
Minor version release
111-
~~~~~~~~~~~~~~~~~~~~~
117+
Minor version release (also known as bug-fix release)
118+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112119

113120
The minor releases should include bug fixes and some relevant documentation
114121
changes only. Any PR resulting in a behavior change which is not a bug fix
115-
should be excluded.
122+
should be excluded. As an example, instructions are given for the `1.2.2` release.
123+
124+
- Create a branch, **on your own fork** (here referred to as `fork`) for the release
125+
from `upstream/main`.
126+
127+
.. prompt:: bash $
128+
129+
git fetch upstream/main
130+
git checkout -b release-1.2.2 upstream/main
131+
git push -u fork release-1.2.2:release-1.2.2
132+
133+
- Create a **draft** PR to the `upstream/1.2.X` branch (not to `upstream/main`)
134+
with all the desired changes.
135+
136+
- Do not push anything on that branch yet.
116137

117-
First, create a branch, **on your own fork** (to release e.g. `0.99.3`):
138+
- Locally rebase `release-1.2.2` from the `upstream/1.2.X` branch using:
118139

119-
.. prompt:: bash $
140+
.. prompt:: bash $
120141

121-
# assuming main and upstream/main are the same
122-
git checkout -b release-0.99.3 main
142+
git rebase -i upstream/1.2.X
123143

124-
Then, create a PR **to the** `scikit-learn/0.99.X` **branch** (not to
125-
main!) with all the desired changes:
144+
This will open an interactive rebase with the `git-rebase-todo` containing all
145+
the latest commit on `main`. At this stage, you have to perform
146+
this interactive rebase with at least someone else (being three people rebasing
147+
is better not to forget something and to avoid any doubt).
126148

127-
.. prompt:: bash $
149+
- **Do not remove lines but drop commit by replace** ``pick`` **with** ``drop``
150+
151+
- Commits to pick for bug-fix release *generally* are prefixed with: `FIX`, `CI`,
152+
`DOC`. They should at least include all the commits of the merged PRs
153+
that were milestoned for this release on GitHub and/or documented as such in
154+
the changelog. It's likely that some bugfixes were documented in the
155+
changelog of the main major release instead of the next bugfix release,
156+
in which case, the matching changelog entries will need to be moved,
157+
first in the `main` branch then backported in the release PR.
158+
159+
- Commits to drop for bug-fix release *generally* are prefixed with: `FEAT`,
160+
`MAINT`, `ENH`, `API`. Reasons for not including them is to prevent change of
161+
behavior (which only must feature in breaking or major releases).
162+
163+
- After having dropped or picked commit, **do no exit** but paste the content
164+
of the `git-rebase-todo` message in the PR.
165+
This file is located at `.git/rebase-merge/git-rebase-todo`.
166+
167+
- Save and exit, starting the interactive rebase.
168+
169+
- Resolve merge conflicts when they happen.
170+
171+
- Force push the result of the rebase and the extra release commits to the release PR:
172+
173+
.. prompt:: bash $
128174

129-
git rebase -i upstream/0.99.2
175+
git push -f fork release-1.2.2:release-1.2.2
130176

131-
Copy the :ref:`release_checklist` templates in the description of the Pull
132-
Request to track progress.
177+
- Copy the :ref:`release_checklist` template and paste it in the description of the
178+
Pull Request to track progress.
133179

134-
Do not forget to add a commit updating ``sklearn.__version__``.
180+
- Review all the commits included in the release to make sure that they do not
181+
introduce any new feature. We should not blindly trust the commit message prefixes.
135182

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.
183+
- Remove the draft status of the release PR and invite other maintainers to review the
184+
list of included commits.
138185

139186
.. _making_a_release:
140187

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.