Skip to content

Commit ca955c8

Browse files
committed
DOC: heading style
1 parent 7814ada commit ca955c8

6 files changed

Lines changed: 75 additions & 32 deletions

File tree

doc/devel/coding_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ local arguments and the rest are passed on as
190190

191191
.. _using_logging:
192192

193-
Using logging for debug messages
194-
================================
193+
Use logging for debug messages
194+
==============================
195195

196196
Matplotlib uses the standard Python `logging` library to write verbose
197197
warnings, information, and debug messages. Please use it! In all those places

doc/devel/min_dep_policy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ Matplotlib Python NumPy
157157
.. _`1.3`: https://matplotlib.org/1.3.0/users/installing.html#build-requirements
158158

159159

160-
Updating Python and NumPy versions
161-
==================================
160+
Update Python and NumPy versions
161+
================================
162162

163163
To update the minimum versions of Python we need to update:
164164

doc/devel/release_guide.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ versioning scheme: *macro.meso.micro*.
4545

4646
.. _release_feature_freeze:
4747

48-
Making the release branch
48+
Create the release branch
4949
=========================
5050

5151
.. note::
@@ -379,8 +379,8 @@ to the VER-doc branch and push to GitHub. ::
379379

380380
.. _release_bld_bin:
381381

382-
Building binaries
383-
=================
382+
Build binaries
383+
==============
384384

385385
We distribute macOS, Windows, and many Linux wheels as well as a source tarball via
386386
PyPI.
@@ -412,8 +412,8 @@ PyPI.
412412

413413
.. _release_upload_bin:
414414

415-
Manually uploading to PyPI
416-
==========================
415+
Manual upload to PyPI
416+
=====================
417417

418418
.. note::
419419

doc/devel/style_guide.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,51 @@ reliability and consistency in documentation. They are not interchangeable.
176176
.. |Axis| replace:: :class:`~matplotlib.axis.Axis`
177177

178178

179+
Headings
180+
--------
181+
Use sentence case for headings.
182+
183+
.. table::
184+
:width: 100%
185+
:widths: 50, 50
186+
187+
+------------------------------------+------------------------------------+
188+
| Correct | Incorrect |
189+
+====================================+====================================+
190+
| Quick start guide | Quick Start Guide |
191+
+------------------------------------+------------------------------------+
192+
193+
Noun phrases and verb phrases are both acceptable for headings. Noun phrases
194+
are preferred for higher-level headings and descriptive sections as they
195+
simply state the content.
196+
197+
.. table::
198+
:width: 100%
199+
:widths: 50, 50
200+
201+
+------------------------------------+------------------------------------+
202+
| Correct | Incorrect |
203+
+====================================+====================================+
204+
| Bug triage and issue curation | Triage bugs and curate issues |
205+
+------------------------------------+------------------------------------+
206+
207+
Verb phrases are preferred for instructive and action-oriented sections; in
208+
particular when they cover steps in a process, such as the subsections in
209+
:ref:`installing_for_devs`.
210+
211+
Use the second-person imperative form of the verb rather than the gerund form.
212+
213+
.. table::
214+
:width: 100%
215+
:widths: 50, 50
216+
217+
+------------------------------------+------------------------------------+
218+
| Correct | Incorrect |
219+
+====================================+====================================+
220+
| Fork the Matplotlib repository | Forking the Matplotlib repository |
221+
+------------------------------------+------------------------------------+
222+
223+
179224
Grammar
180225
-------
181226

doc/devel/testing.rst

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ testing infrastructure are in :mod:`matplotlib.testing`.
1313
.. _pytest-xdist: https://pypi.org/project/pytest-xdist/
1414

1515

16-
.. _testing_requirements:
17-
18-
Requirements
19-
------------
16+
Prerequisites
17+
-------------
2018

2119
To run the tests you will need to
2220
:ref:`set up Matplotlib for development <installing_for_devs>`. Note in
@@ -34,8 +32,8 @@ particular the :ref:`additional dependencies <test-dependencies>` for testing.
3432

3533
.. _run_tests:
3634

37-
Running the tests
38-
-----------------
35+
Run the tests
36+
-------------
3937

4038
In the root directory of your development repository run::
4139

@@ -82,8 +80,8 @@ to avoid clashes between ``pytest``'s import mode and Python's search path:
8280

8381
python -m pytest --import-mode prepend
8482

85-
Viewing image test output
86-
^^^^^^^^^^^^^^^^^^^^^^^^^
83+
View image test output
84+
^^^^^^^^^^^^^^^^^^^^^^
8785

8886
The output of :ref:`image-based <image-comparison>` tests is stored in a
8987
``result_images`` directory. These images can be compiled into one HTML page, containing
@@ -100,8 +98,8 @@ to the folder where the baseline test images are stored. The triage tool require
10098
:ref:`QT <backend_dependencies>` is installed.
10199

102100

103-
Writing tests
104-
-------------
101+
Write tests
102+
-----------
105103
Tests are located in :file:`lib/matplotlib/tests`. They are organized to mirror
106104
the structure of the code in :file:`lib/matplotlib`. For example, tests for
107105
the ``mathtext.py`` module are in :file:`lib/matplotlib/tests/test_mathtext.py`.
@@ -284,8 +282,8 @@ See the documentation of `~matplotlib.testing.decorators.image_comparison` and
284282
`~matplotlib.testing.decorators.check_figures_equal` for additional information
285283
about their use.
286284

287-
Using GitHub Actions for CI
288-
---------------------------
285+
CI with GitHub Actions
286+
----------------------
289287

290288
`GitHub Actions <https://docs.github.com/en/actions>`_ is a hosted CI system
291289
"in the cloud".
@@ -311,8 +309,8 @@ https://github.com/your_GitHub_user_name/matplotlib/actions -- here's `an
311309
example <https://github.com/QuLogic/matplotlib/actions>`_.
312310

313311

314-
Using tox
315-
---------
312+
tox: Test multiple python versions
313+
----------------------------------
316314

317315
`Tox <https://tox.readthedocs.io/en/latest/>`_ is a tool for running tests
318316
against multiple Python environments, including multiple versions of Python
@@ -352,17 +350,17 @@ tests are run. For more info on the ``tox.ini`` file, see the `Tox
352350
Configuration Specification
353351
<https://tox.readthedocs.io/en/latest/config.html>`_.
354352

355-
Building old versions of Matplotlib
356-
-----------------------------------
353+
Build old versions of Matplotlib
354+
--------------------------------
357355

358356
When running a ``git bisect`` to see which commit introduced a certain bug,
359357
you may (rarely) need to build very old versions of Matplotlib. The following
360358
constraints need to be taken into account:
361359

362360
- Matplotlib 1.3 (or earlier) requires numpy 1.8 (or earlier).
363361

364-
Testing released versions of Matplotlib
365-
---------------------------------------
362+
Test released versions of Matplotlib
363+
------------------------------------
366364
Running the tests on an installation of a released version (e.g. PyPI package
367365
or conda package) also requires additional setup.
368366

doc/devel/triage.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
.. _bug_triaging:
33

4-
*******************************
5-
Bug triaging and issue curation
6-
*******************************
4+
*****************************
5+
Bug triage and issue curation
6+
*****************************
77

88
The `issue tracker <https://github.com/matplotlib/matplotlib/issues>`_
99
is important to communication in the project because it serves as the
@@ -107,8 +107,8 @@ important tasks:
107107
question or has been considered as unclear for many years, then it
108108
should be closed.
109109

110-
Preparing PRs for review
111-
========================
110+
Prepare PRs for review
111+
======================
112112

113113
Reviewing code is also encouraged. Contributors and users are welcome to
114114
participate to the review process following our :ref:`review guidelines

0 commit comments

Comments
 (0)