@@ -18,6 +18,47 @@ Release guide
1818 ``remote `` and a read/write remote is ``DANGER ``
1919
2020
21+ .. _release_feature_freeze :
22+
23+ Making the release branch
24+ =========================
25+
26+ When a new minor release (vX.Y.0) is approaching, a new release branch must be made.
27+ When precisely this happens is up to the release manager, but at this point is where
28+ most new features intended for the minor release are merged and you are entering a
29+ feature freeze (i.e. newly implemented features will be going into vX.Y+1).
30+ This does not necessarily mean that no further changes will be made prior to release,
31+ just that those changes will be made using the backport system.
32+
33+ First create the branch ::
34+
35+ git switch main
36+ git pull
37+ git switch -c v3.7.x
38+ git push DANGER v3.7.x
39+
40+ Update the ``v3.7.0 `` milestone so that the description reads::
41+
42+ New features and API changes
43+
44+ on-merge: backport to v3.7.x
45+
46+ Micro versions should instead read::
47+
48+ Bugfixes and docstring changes
49+
50+ on-merge: backport to v3.7.x
51+
52+ Check all active milestones for consistency. Older milestones should also backport
53+ to higher minor versions (e.g. ``v3.6.3 `` and ``v3.6-doc `` should backport to both
54+ ``v3.6.x `` and ``v3.7.x `` once the ``v3.7.x `` branch exists and while PR backports are
55+ still targeting ``v3.6.x ``)
56+
57+ Create the milestone for the next-next minor release (i.e. ``v3.9.0 ``, as ``v3.8.0 ``
58+ should already exist). While most active items should go in the next minor release,
59+ this milestone can help with longer term planning, especially around deprecation
60+ cycles.
61+
2162.. _release-testing :
2263
2364Testing
@@ -50,16 +91,16 @@ prepare this list:
5091 b. Change the link target at the top of the file.
5192 c. Remove the "Previous GitHub Stats" section at the end.
5293
53- For example, when updating from v3.2 .0 to v3.2 .1::
94+ For example, when updating from v3.7 .0 to v3.7 .1::
5495
55- cp doc/users/github_stats.rst doc/users/prev_whats_new/github_stats_3.2 .0.rst
56- $EDITOR doc/users/prev_whats_new/github_stats_3.2 .0.rst
96+ cp doc/users/github_stats.rst doc/users/prev_whats_new/github_stats_3.7 .0.rst
97+ $EDITOR doc/users/prev_whats_new/github_stats_3.7 .0.rst
5798 # Change contents as noted above.
58- git add doc/users/prev_whats_new/github_stats_3.2 .0.rst
99+ git add doc/users/prev_whats_new/github_stats_3.7 .0.rst
59100
601012. Re-generate the updated stats::
61102
62- python tools/github_stats.py --since-tag v3.2 .0 --milestone=v3.2 .1 \
103+ python tools/github_stats.py --since-tag v3.7 .0 --milestone=v3.7 .1 \
63104 --project 'matplotlib/matplotlib' --links > doc/users/github_stats.rst
64105
651063. Review and commit changes. Some issue/PR titles may not be valid reST (the most
@@ -87,7 +128,7 @@ Update and validate the docs
87128Merge ``*-doc `` branch
88129----------------------
89130
90- Merge the most recent 'doc' branch (e.g., ``v3.2 .0-doc ``) into the branch you
131+ Merge the most recent 'doc' branch (e.g., ``v3.7 .0-doc ``) into the branch you
91132are going to tag on and delete the doc branch on GitHub.
92133
93134Update supported versions in Security Policy
@@ -193,7 +234,7 @@ notes in the commit message::
193234
194235and then create a signed, annotated tag with the same text in the body message::
195236
196- git tag -a -s v2.0 .0
237+ git tag -a -s v3.7 .0
197238
198239which will prompt you for your GPG key password and an annotation. For pre-releases it
199240is important to follow :pep: `440 ` so that the build artifacts will sort correctly in
@@ -206,7 +247,7 @@ it is important to move all branches away from the commit with the tag [#]_::
206247
207248Finally, push the tag to GitHub::
208249
209- git push DANGER v2.0 .x v2.0 .0
250+ git push DANGER v3.7 .x v3.7 .0
210251
211252Congratulations, the scariest part is done!
212253This assumes the release branch has already been made.
@@ -228,40 +269,30 @@ coincides with the last patch release of the previous minor version)
228269
229270 To generate the file that GitHub does use::
230271
231- git archive v2.0 .0 -o matplotlib-2.0 .0.tar.gz --prefix=matplotlib-2.0 .0/
272+ git archive v3.7 .0 -o matplotlib-3.7 .0.tar.gz --prefix=matplotlib-3.7 .0/
232273
233274 .. _git archive : https://git-scm.com/docs/git-archive
234275.. _setuptools_scm : https://github.com/pypa/setuptools_scm
235276
236277If this is a final release, also create a 'doc' branch (this is not
237278done for pre-releases)::
238279
239- git branch v2.0 .0-doc
240- git push DANGER v2.0 .0-doc
280+ git branch v3.7 .0-doc
281+ git push DANGER v3.7 .0-doc
241282
242- Update (or create) the ``v2.0 -doc `` milestone.
283+ Update (or create) the ``v3.7 -doc `` milestone.
243284The description should include the instruction for meeseeksmachine to backport changes
244- with the ``v2.0 -doc `` milestone to both the ``v2.0 .x `` branch and the ``v2.0 .0-doc `` branch::
285+ with the ``v3.7 -doc `` milestone to both the ``v3.7 .x `` branch and the ``v3.7 .0-doc `` branch::
245286
246287 Documentation changes (.rst files and examples)
247288
248- on-merge: backport to v2.0 .x
249- on-merge: backport to v2.0 .0-doc
289+ on-merge: backport to v3.7 .x
290+ on-merge: backport to v3.7 .0-doc
250291
251292Check all active milestones for consistency. Older doc milestones should also backport to
252293higher minor versions (e.g. ``v3.6-doc `` should backport to both ``v3.6.x `` and ``v3.7.x ``
253294if the ``v3.7.x `` branch exists)
254295
255- On this branch un-comment the globs from :ref: `release_chkdocs `. And then ::
256-
257- git push DANGER v2.1.x
258-
259- If this is the last micro release anticipated (or otherwise are entering feature
260- freeze for the next minor release), create a release branch for the next minor
261- release ::
262-
263- git switch main
264- git branch v2.1.x
265296
266297.. _release_DOI :
267298
@@ -280,11 +311,11 @@ edit :file:`doc/users/project/citing.rst`. Commit the new SVG, the change to
280311:file: `tools/cache_zenodo_svg.py `, and the changes to :file: `doc/users/project/citing.rst `
281312to the VER-doc branch and push to GitHub. ::
282313
283- git checkout v2.0 .0-doc
314+ git checkout v3.7 .0-doc
284315 $EDITOR tools/cache_zenodo_svg.py
285316 python tools/cache_zenodo_svg.py
286317 git commit -a
287- git push DANGER v2.0 .0-doc:v2.0 .0-doc
318+ git push DANGER v3.7 .0-doc:v3.7 .0-doc
288319
289320
290321.. _release_bld_bin :
@@ -316,7 +347,7 @@ Make distribution and upload to PyPI
316347Once you have collected all of the wheels (expect this to take a few hours), generate
317348the tarball::
318349
319- git checkout v2.0 .0
350+ git checkout v3.7 .0
320351 git clean -xfd
321352 python -m build --sdist
322353
@@ -343,7 +374,7 @@ build the docs from the ``ver-doc`` branch. An easy way to arrange this is::
343374
344375 pip install matplotlib
345376 pip install -r requirements/doc/doc-requirements.txt
346- git checkout v2.0 .0-doc
377+ git checkout v3.7 .0-doc
347378 git clean -xfd
348379 make -Cdoc O="-t release -j$(nproc)" html latexpdf LATEXMKOPTS="-silent -f"
349380
@@ -363,22 +394,22 @@ Assuming you have this repository checked out in the same directory as
363394matplotlib ::
364395
365396 cd ../matplotlib.github.com
366- cp -a ../matplotlib/doc/build/html 2.0 .0
367- rm 2.0 .0/.buildinfo
368- cp ../matplotlib/doc/build/latex/Matplotlib.pdf 2.0 .0
397+ cp -a ../matplotlib/doc/build/html 3.7 .0
398+ rm 3.7 .0/.buildinfo
399+ cp ../matplotlib/doc/build/latex/Matplotlib.pdf 3.7 .0
369400
370401which will copy the built docs over. If this is a final release, link the
371402``stable `` subdirectory to the newest version::
372403
373404 rm stable
374- ln -s 2.0 .0 stable
405+ ln -s 3.7 .0 stable
375406
376407You will need to manually edit :file: `versions.html ` to show the last
3774083 tagged versions. You will also need to edit :file: `sitemap.xml ` to include
378409the newly released version. Now commit and push everything to GitHub ::
379410
380411 git add *
381- git commit -a -m 'Updating docs for v2.0 .0'
412+ git commit -a -m 'Updating docs for v3.7 .0'
382413 git push DANGER main
383414
384415Congratulations you have now done the third scariest part!
@@ -388,6 +419,33 @@ If you have access, clear the CloudFlare caches.
388419It typically takes about 5-10 minutes for the website to process the push and update the
389420live web page (remember to clear your browser cache).
390421
422+ .. _release_merge_up :
423+
424+ Merge up changes to main
425+ ========================
426+
427+ After a release is done, the changes from the release branch should be merged into the
428+ ``main `` branch. This is primarily done so that the released tag is on the main branch
429+ so ``git describe `` (and thus ``setuptools-scm ``) has the most current tag.
430+ Secondarily, changes made during release (including removing individualized release
431+ notes, fixing broken links, and updating the version switcher) are bubbled up to
432+ ``main ``.
433+
434+ Git conflicts are very likely to arise, though aside from changes made directly to the
435+ release branch (mostly as part of the release), should be relatively trivially resolved
436+ by using the version from ``main ``. This is not a universal rule, and care should be
437+ taken to ensure correctness::
438+
439+ git switch main
440+ git pull
441+ git switch -c merge_up_v3.7.0
442+ git merge v3.7.x
443+ # resolve conflicts
444+ git merge --continue
445+
446+ Due to branch protections for the ``main `` branch, this is merged via a standard pull
447+ request, though the PR cleanliness status check is expected to fail. The PR should not
448+ be squashed because the intent is to merge the branch histories.
391449
392450Announcing
393451==========
0 commit comments