@@ -18,6 +18,47 @@ Release guide
18
18
``remote `` and a read/write remote is ``DANGER ``
19
19
20
20
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 should happen is up to the release manager, but 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
+ For an upcoming ``v3.7.0 `` release, 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
+
21
62
.. _release-testing :
22
63
23
64
Testing
@@ -34,6 +75,14 @@ In addition the following test should be run and manually inspected::
34
75
35
76
python tools/memleak.py agg 1000 agg.pdf
36
77
78
+ Run the User Acceptance Tests for the NBAgg and ipympl backends::
79
+
80
+ jupyter notebook lib/matplotlib/backends/web_backend/nbagg_uat.ipynb
81
+
82
+ For ipympl, restart the kernel, add a cell for ``%matplotlib widget `` and do
83
+ not run the cell with ``matplotlib.use('nbagg') ``. Tests which check
84
+ ``connection_info ``, use ``reshow ``, or test the OO interface are not expected
85
+ to work for ``ipympl ``.
37
86
38
87
.. _release_ghstats :
39
88
@@ -50,16 +99,16 @@ prepare this list:
50
99
b. Change the link target at the top of the file.
51
100
c. Remove the "Previous GitHub Stats" section at the end.
52
101
53
- For example, when updating from v3.2 .0 to v3.2 .1::
102
+ For example, when updating from v3.7 .0 to v3.7 .1::
54
103
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
104
+ cp doc/users/github_stats.rst doc/users/prev_whats_new/github_stats_3.7 .0.rst
105
+ $EDITOR doc/users/prev_whats_new/github_stats_3.7 .0.rst
57
106
# Change contents as noted above.
58
- git add doc/users/prev_whats_new/github_stats_3.2 .0.rst
107
+ git add doc/users/prev_whats_new/github_stats_3.7 .0.rst
59
108
60
109
2. Re-generate the updated stats::
61
110
62
- python tools/github_stats.py --since-tag v3.2 .0 --milestone=v3.2 .1 \
111
+ python tools/github_stats.py --since-tag v3.7 .0 --milestone=v3.7 .1 \
63
112
--project 'matplotlib/matplotlib' --links > doc/users/github_stats.rst
64
113
65
114
3. Review and commit changes. Some issue/PR titles may not be valid reST (the most
@@ -87,7 +136,7 @@ Update and validate the docs
87
136
Merge ``*-doc `` branch
88
137
----------------------
89
138
90
- Merge the most recent 'doc' branch (e.g., ``v3.2 .0-doc ``) into the branch you
139
+ Merge the most recent 'doc' branch (e.g., ``v3.7 .0-doc ``) into the branch you
91
140
are going to tag on and delete the doc branch on GitHub.
92
141
93
142
Update supported versions in Security Policy
@@ -193,7 +242,7 @@ notes in the commit message::
193
242
194
243
and then create a signed, annotated tag with the same text in the body message::
195
244
196
- git tag -a -s v2.0 .0
245
+ git tag -a -s v3.7 .0
197
246
198
247
which will prompt you for your GPG key password and an annotation. For pre-releases it
199
248
is important to follow :pep: `440 ` so that the build artifacts will sort correctly in
@@ -206,9 +255,12 @@ it is important to move all branches away from the commit with the tag [#]_::
206
255
207
256
Finally, push the tag to GitHub::
208
257
209
- git push DANGER main v2.0 .0
258
+ git push DANGER v3.7.x v3.7 .0
210
259
211
260
Congratulations, the scariest part is done!
261
+ This assumes the release branch has already been made.
262
+ Usually this is done at the time of feature freeze for a minor release (which often
263
+ coincides with the last patch release of the previous minor version)
212
264
213
265
.. [# ] The tarball that is provided by GitHub is produced using `git archive `_.
214
266
We use setuptools_scm _ which uses a format string in
@@ -225,25 +277,29 @@ Congratulations, the scariest part is done!
225
277
226
278
To generate the file that GitHub does use::
227
279
228
- git archive v2.0 .0 -o matplotlib-2.0 .0.tar.gz --prefix=matplotlib-2.0 .0/
280
+ git archive v3.7 .0 -o matplotlib-3.7 .0.tar.gz --prefix=matplotlib-3.7 .0/
229
281
230
282
.. _git archive : https://git-scm.com/docs/git-archive
231
283
.. _setuptools_scm : https://github.com/pypa/setuptools_scm
232
284
233
285
If this is a final release, also create a 'doc' branch (this is not
234
286
done for pre-releases)::
235
287
236
- git branch v2.0 .0-doc
237
- git push DANGER v2.0 .0-doc
288
+ git branch v3.7 .0-doc
289
+ git push DANGER v3.7 .0-doc
238
290
239
- and if this is a major or minor release, also create a bug-fix branch (a micro
240
- release will be cut from this branch)::
291
+ Update (or create) the ``v3.7-doc `` milestone.
292
+ The description should include the instruction for meeseeksmachine to backport changes
293
+ with the ``v3.7-doc `` milestone to both the ``v3.7.x `` branch and the ``v3.7.0-doc `` branch::
241
294
242
- git branch v2.0.x
295
+ Documentation changes (.rst files and examples)
243
296
244
- On this branch un-comment the globs from :ref: `release_chkdocs `. And then ::
297
+ on-merge: backport to v3.7.x
298
+ on-merge: backport to v3.7.0-doc
245
299
246
- git push DANGER v2.0.x
300
+ Check all active milestones for consistency. Older doc milestones should also backport to
301
+ higher minor versions (e.g. ``v3.6-doc `` should backport to both ``v3.6.x `` and ``v3.7.x ``
302
+ if the ``v3.7.x `` branch exists)
247
303
248
304
249
305
.. _release_DOI :
@@ -259,16 +315,15 @@ automatically produce one once the tag is pushed). Add the DOI post-fix and vers
259
315
the dictionary in :file: `tools/cache_zenodo_svg.py ` and run the script.
260
316
261
317
This will download the new SVG to :file: `doc/_static/zenodo_cache/{ postfix } .svg ` and
262
- edit :file: `doc/citing.rst `. Commit the new SVG, the change to
263
- :file: `tools/cache_zenodo_svg.py `, and the changes to :file: `doc/citing.rst ` to the
264
- VER-doc branch and push to GitHub. ::
318
+ edit :file: `doc/users/project/ citing.rst `. Commit the new SVG, the change to
319
+ :file: `tools/cache_zenodo_svg.py `, and the changes to :file: `doc/users/project/ citing.rst `
320
+ to the VER-doc branch and push to GitHub. ::
265
321
266
- git checkout v2.0 .0-doc
322
+ git checkout v3.7 .0-doc
267
323
$EDITOR tools/cache_zenodo_svg.py
268
324
python tools/cache_zenodo_svg.py
269
- $EDITOR doc/citing.html
270
325
git commit -a
271
- git push DANGER v2.0 .0-doc:v2.0 .0-doc
326
+ git push DANGER v3.7 .0-doc:v3.7 .0-doc
272
327
273
328
274
329
.. _release_bld_bin :
@@ -300,7 +355,7 @@ Make distribution and upload to PyPI
300
355
Once you have collected all of the wheels (expect this to take a few hours), generate
301
356
the tarball::
302
357
303
- git checkout v2.0 .0
358
+ git checkout v3.7 .0
304
359
git clean -xfd
305
360
python -m build --sdist
306
361
@@ -327,7 +382,7 @@ build the docs from the ``ver-doc`` branch. An easy way to arrange this is::
327
382
328
383
pip install matplotlib
329
384
pip install -r requirements/doc/doc-requirements.txt
330
- git checkout v2.0 .0-doc
385
+ git checkout v3.7 .0-doc
331
386
git clean -xfd
332
387
make -Cdoc O="-t release -j$(nproc)" html latexpdf LATEXMKOPTS="-silent -f"
333
388
@@ -347,22 +402,22 @@ Assuming you have this repository checked out in the same directory as
347
402
matplotlib ::
348
403
349
404
cd ../matplotlib.github.com
350
- cp -a ../matplotlib/doc/build/html 2.0 .0
351
- rm 2.0 .0/.buildinfo
352
- cp ../matplotlib/doc/build/latex/Matplotlib.pdf 2.0 .0
405
+ cp -a ../matplotlib/doc/build/html 3.7 .0
406
+ rm 3.7 .0/.buildinfo
407
+ cp ../matplotlib/doc/build/latex/Matplotlib.pdf 3.7 .0
353
408
354
409
which will copy the built docs over. If this is a final release, link the
355
410
``stable `` subdirectory to the newest version::
356
411
357
412
rm stable
358
- ln -s 2.0 .0 stable
413
+ ln -s 3.7 .0 stable
359
414
360
- You will need to manually edit :file: `versions.html ` to show the last
361
- 3 tagged versions. You will also need to edit :file: `sitemap.xml ` to include
415
+ You will need to manually edit :file: `versions.html ` to show the released version.
416
+ You will also need to edit :file: `sitemap.xml ` to include
362
417
the newly released version. Now commit and push everything to GitHub ::
363
418
364
419
git add *
365
- git commit -a -m 'Updating docs for v2.0 .0'
420
+ git commit -a -m 'Updating docs for v3.7 .0'
366
421
git push DANGER main
367
422
368
423
Congratulations you have now done the third scariest part!
@@ -372,6 +427,33 @@ If you have access, clear the CloudFlare caches.
372
427
It typically takes about 5-10 minutes for the website to process the push and update the
373
428
live web page (remember to clear your browser cache).
374
429
430
+ .. _release_merge_up :
431
+
432
+ Merge up changes to main
433
+ ========================
434
+
435
+ After a release is done, the changes from the release branch should be merged into the
436
+ ``main `` branch. This is primarily done so that the released tag is on the main branch
437
+ so ``git describe `` (and thus ``setuptools-scm ``) has the most current tag.
438
+ Secondarily, changes made during release (including removing individualized release
439
+ notes, fixing broken links, and updating the version switcher) are bubbled up to
440
+ ``main ``.
441
+
442
+ Git conflicts are very likely to arise, though aside from changes made directly to the
443
+ release branch (mostly as part of the release), they should be relatively-easily resolved
444
+ by using the version from ``main ``. This is not a universal rule, and care should be
445
+ taken to ensure correctness::
446
+
447
+ git switch main
448
+ git pull
449
+ git switch -c merge_up_v3.7.0
450
+ git merge v3.7.x
451
+ # resolve conflicts
452
+ git merge --continue
453
+
454
+ Due to branch protections for the ``main `` branch, this is merged via a standard pull
455
+ request, though the PR cleanliness status check is expected to fail. The PR should not
456
+ be squashed because the intent is to merge the branch histories.
375
457
376
458
Announcing
377
459
==========
@@ -384,8 +466,10 @@ version of the release notes along with acknowledgments should be sent to
384
466
385
467
386
468
In addition, announcements should be made on social networks (e.g., Twitter via the
387
- ``@matplotlib `` account, any other via personal accounts). `NumFOCUS
388
- <https://numfocus.org/> `__ should be contacted for inclusion in their newsletter.
469
+ ``@matplotlib `` account, any other via personal accounts).
470
+
471
+ Add a release announcement to the ``mpl-brochure-site `` "News" section of
472
+ ``docs/body.html ``, linking to the discourse page for the announcement.
389
473
390
474
391
475
Conda packages
0 commit comments