Skip to content

Commit bc58b92

Browse files
committed
Remove some manual manipulation of whatsnew when releasing.
This PR ensures that the "unmerged" whatsnew entries get included in the docs if and only if we're building the docs for a "local release", i.e. when the version number includes a git tag, but not a tagged release. This previously required manual manipulation.
1 parent f8f14d7 commit bc58b92

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
'sphinx.ext.autodoc',
3232
'sphinx.ext.autosummary',
3333
'sphinx.ext.doctest',
34+
'sphinx.ext.ifconfig',
3435
'sphinx.ext.inheritance_diagram',
3536
'sphinx.ext.intersphinx',
3637
'IPython.sphinxext.ipython_console_highlighting',

doc/devel/release_guide.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ Review and commit changes. Some issue/PR titles may not be valid rst (the most
4848
Check Docs
4949
----------
5050

51-
Before tagging, update the what's new listing in :file:`doc/users/whats_new.rst`
52-
by merging all files in :file:`doc/users/next_whats_new/` coherently. Also,
53-
temporarily comment out the include and toctree glob; re-instate these after a
54-
release. Finally, make sure that the docs build cleanly ::
51+
Before tagging, update the what's new listing in
52+
:file:`doc/users/whats_new.rst` by merging all files in
53+
:file:`doc/users/next_whats_new/` coherently. Then, make sure that the docs
54+
build cleanly::
5555

5656
make -Cdoc O=-n$(nproc) html latexpdf
5757

doc/users/whats_new.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@ revision, see the :ref:`github-stats`.
1010
.. contents:: Table of Contents
1111
:depth: 4
1212

13+
.. ifconfig:: __import__('pkg_resources').parse_version(version).local
1314

14-
..
15-
For a release, add a new section after this, then comment out the include
16-
and toctree below by indenting them. Uncomment them after the release.
17-
.. include:: next_whats_new/README.rst
18-
.. toctree::
19-
:glob:
20-
:maxdepth: 1
15+
.. include:: next_whats_new/README.rst
16+
.. toctree::
17+
:glob:
18+
:maxdepth: 1
2119

22-
next_whats_new/*
20+
next_whats_new/*
2321

2422

2523
New in Matplotlib 2.2

0 commit comments

Comments
 (0)