Skip to content

Commit 61100f5

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 61100f5

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

doc/api/api_changes.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ out what caused the breakage and how to fix it by updating your code.
1010
For new features that were added to Matplotlib, please see
1111
:ref:`whats-new`.
1212

13-
.. for a release comment out the toctree below
13+
.. ifconfig:: __import__('pkg_resources').parse_version(version).local
1414

15+
.. toctree::
16+
:glob:
17+
:maxdepth: 1
1518

16-
.. toctree::
17-
:glob:
18-
:maxdepth: 1
19-
20-
next_api_changes/*
19+
next_api_changes/*
2120

2221

2322
API Changes in 2.2.0

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/next_whats_new/README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ When adding an entry please look at the currently existing files to
99
see if you can extend any of them. If you create a file, name it
1010
something like :file:`cool_new_feature.rst` if you have added a brand new
1111
feature or something like :file:`updated_feature.rst` for extensions of
12-
existing features. Include contents of the form: ::
12+
existing features. Include contents of the form:
13+
14+
.. code-block:: rst
1315
1416
Section Title for Feature
1517
-------------------------

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)