Skip to content

Commit a2f71c6

Browse files
committed
DOC Update instructions for bug-fix release
1 parent 26ed228 commit a2f71c6

File tree

1 file changed

+45
-15
lines changed

1 file changed

+45
-15
lines changed

doc/developers/maintainer.rst

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Before a release
1717

1818
1. Update authors table:
1919

20+
Create a token on GitHub's page with the following permission: ``read:org``.
21+
Run the following script, entering the token in:
2022
.. prompt:: bash $
2123

2224
cd build_tools; make authors; cd ..
@@ -107,34 +109,62 @@ under the ``doc/whats_new/`` folder so PRs that target the next version can
107109
contribute their changelog entries to this file in parallel to the release
108110
process.
109111

110-
Minor version release
111-
~~~~~~~~~~~~~~~~~~~~~
112+
Minor version release and bug-fix release
113+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112114

113115
The minor releases should include bug fixes and some relevant documentation
114116
changes only. Any PR resulting in a behavior change which is not a bug fix
115117
should be excluded.
116118

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``
118147

119-
.. prompt:: bash $
148+
- Commits to pick for bug-fix release *generally* are prefixed with: `FIX`, `CI`,
149+
`DOC`
120150

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`
123153

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`).
126157

127-
.. prompt:: bash $
158+
- Save and exit, starting the interactive rebase.
128159

129-
git rebase -i upstream/0.99.X
160+
- Resolve merge conflicts when they happen.
130161

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.
133163

134-
Do not forget to add a commit updating ``sklearn.__version__``.
164+
- Create a commit updating the version number i.e. ``sklearn.__version__``.
135165

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.
138168

139169
.. _making_a_release:
140170

0 commit comments

Comments
 (0)