Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e6766b

Browse filesBrowse files
committed
Update PR guidelines
1 parent eb9b0d5 commit 6e6766b
Copy full SHA for 6e6766b

File tree

Expand file treeCollapse file tree

1 file changed

+134
-31
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+134
-31
lines changed

‎doc/devel/coding_guide.rst

Copy file name to clipboardExpand all lines: doc/devel/coding_guide.rst
+134-31Lines changed: 134 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,74 @@
1-
.. _reviewers-guide:
1+
.. _pr-guidelines:
22

3-
********************
4-
Reviewers guideline
5-
********************
3+
***********************
4+
Pull request guidelines
5+
***********************
66

7-
.. _pull-request-checklist:
7+
Pull requests (PRs) are the mechanism for contributing to Matplotlibs code and
8+
documentation.
89

9-
Pull request checklist
10-
======================
10+
.. _pr-checklist-authors:
1111

12-
Branch selection
13-
----------------
12+
Checklist for PR authors
13+
========================
14+
15+
.. note::
16+
17+
* We value contributions from people with all levels of experience. In
18+
particular if this is your first PR not everything has to be perfect.
19+
We'll guide you through the PR process.
20+
* Nevertheless, try to follow below guidelines as good as you can to
21+
help make the PR process quick and smooth.
22+
* Be patient with reviewers. We try our best to respond quickly, but we
23+
have limited bandwidth. If there is no feedback within a couple of days,
24+
please ping us by posting a comment to your PR.
25+
26+
When making a PR, pay attention to:
27+
28+
* :ref:`Target the master branch <pr-branch-selection>`.
29+
* Adhere to the :ref:`coding_guidelines`.
30+
* Update the :ref:`documentation <pr-documentation>` if necessary.
31+
* Aim at making the PR as "ready-to-go" as you can. This helps to speed up
32+
the review process.
33+
* It is ok to open incomplete or work-in-progress PRs if you need help or
34+
feedback from the developers.
35+
36+
See also :ref:`contributing` for how to make a PR.
37+
38+
.. _pr-checklist-reviewers:
39+
40+
Checklist for PR reviewers
41+
==========================
42+
.. note::
43+
44+
* If you have commit rights, then you are trusted to use them.
45+
**Please help review and merge PRs!**
46+
* Be patient and `kind <https://youtu.be/tzFWz5fiVKU?t=49m30s>`__ with
47+
contributors.
1448

15-
Generally, all pull requests (*PRs*) should target the master branch. Other
16-
branches are fed through automatic or manual backports. Directly targeting
17-
other branches is only rarely necessary for special maintenance work.
49+
Content topics:
50+
51+
* Is the feature / bugfix reasonable?
52+
* Does the PR conform with the :ref:`coding_guidelines`?
53+
* Is the :ref:`documentation <pr-documentation>` (docstrings, examples,
54+
what's new, API changes) updated?
55+
56+
Organizational topics:
57+
58+
* Make sure all :ref:`automated tests <pr-automated-tests>` pass.
59+
* The PR should :ref:`target the master branch <pr-branch-selection>`.
60+
* Tag with descriptive :ref:`labels <pr-labels>`.
61+
* Set the :ref:`milestone <pr-milestones>`.
62+
* Keep an eye on the :ref:`number of commits <pr-squashing>`.
63+
* Approve if all of the above topics handled.
64+
* :ref:`Merge <pr-merging>` if a sufficient number of approvals is reached.
65+
66+
.. _pr-guidelines-details:
67+
68+
Detailed Guidelines
69+
===================
70+
71+
.. _pr-documentation:
1872

1973
Documentation
2074
-------------
@@ -38,24 +92,25 @@ Documentation
3892
* If you change the API in a backward-incompatible way, please
3993
document it in :file:`doc/api/api_changes.rst`.
4094

41-
PR Review guidelines
42-
====================
43-
44-
* Be patient and `kind <https://youtu.be/tzFWz5fiVKU?t=49m30s>`__ with
45-
contributors.
95+
.. _pr-labels:
4696

47-
* If you have commit rights, then you are trusted to use them. Please
48-
help review and merge PRs!
97+
Labels
98+
------
4999

50100
* If you have the rights to set labels, tag the PR with descriptive labels.
51101
See the `list of labels <https://github.com/matplotlib/matplotlib/labels>`__.
52102

103+
.. _pr-milestones:
104+
105+
Milestones
106+
----------
107+
53108
* Set the milestone according to these rules:
54109

55-
* *New features and API changes* are milestoned for the next point-release
110+
* *New features and API changes* are milestoned for the next minor release
56111
``v3.X.0``.
57112

58-
* *Bugfixes and docstring changes* are milestoned for the next bugfix
113+
* *Bugfixes and docstring changes* are milestoned for the next patch
59114
release ``v3.X.Y``
60115

61116
* *Documentation changes* (all .rst files and examples) are milestoned
@@ -67,6 +122,11 @@ PR Review guidelines
67122
an :ref:`automatic backport <automated-backports>` for milestones which have
68123
a corresponding branch.
69124

125+
.. _pr-merging:
126+
127+
Merging
128+
-------
129+
70130
* Documentation and examples may be merged by the first reviewer. Use
71131
the threshold "is this better than it was?" as the review criteria.
72132

@@ -95,6 +155,11 @@ PR Review guidelines
95155
A core dev should only champion one PR at a time and we should try to keep
96156
the flow of championed PRs reasonable.
97157

158+
.. _pr-automated-tests:
159+
160+
Automated tests
161+
---------------
162+
98163
* Make sure the Travis, Appveyor, CircleCI, and codecov tests are passing
99164
before merging.
100165

@@ -107,6 +172,11 @@ PR Review guidelines
107172
when another reviewer explicitly allows it (ex, "Approve modulo CI
108173
passing, may self merge when green").
109174

175+
.. _pr-squashing:
176+
177+
Number of commits and squashing
178+
-------------------------------
179+
110180
* Squashing is case-by-case. The balance is between burden on the
111181
contributor, keeping a relatively clean history, and keeping a
112182
history usable for bisecting. The only time we are really strict
@@ -126,37 +196,68 @@ PR Review guidelines
126196
with the contributor first.
127197

128198

199+
.. _branches_and_backports:
200+
129201
Branches and Backports
130202
======================
131203

132-
204+
Current branches
205+
----------------
133206
The current active branches are
134207

135208
*master*
136-
This will be Matplotlib 3.0. Supports Python 3.5+.
209+
The current development version. Future minor releases (*v3.N.0*) will be
210+
branched from this. Supports Python 3.6+.
211+
212+
*v3.N.x*
213+
Maintenance branch for Matplotlib 3.N. Future patch releases will be
214+
branched from this. Supports Python 3.6+
215+
216+
*v3.N.M-doc*
217+
Documentation for the current release. On a patch release, this will be
218+
replaced by a properly named branch for the new release.
137219

138220
*v2.2.x*
139221
Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+
140222

141223
*v2.2.N-doc*
142-
Documentation for the current release. On a patch release, this will be replaced
143-
by a properly named branch for the new release.
224+
Documentation for the current release. On a patch release, this will be
225+
replaced by a properly named branch for the new release.
226+
227+
228+
.. _pr-branch-selection:
229+
230+
Branch selection for pull requests
231+
----------------------------------
232+
233+
Generally, all pull requests should target the master branch.
144234

235+
Other branches are fed through :ref:`automatic <automated-backports>` or
236+
:ref:`manual <manual-backports>`. Directly
237+
targeting other branches is only rarely necessary for special maintenance
238+
work.
145239

146-
We always will backport to 2.2.x
240+
.. backport_strategy:
241+
242+
Backport strategy
243+
-----------------
244+
245+
We will always backport to the patch release branch (*v3.N.x*):
147246

148247
- critical bug fixes (segfault, failure to import, things that the
149248
user can not work around)
150-
- fixes for regressions against 2.0 or 2.1
249+
- fixes for regressions against the last two releases.
151250

152-
Everything else (regressions against 1.x versions, bugs/api
251+
Everything else (regressions against older releases, bugs/api
153252
inconsistencies the user can work around in their code) are on a
154253
case-by-case basis, should be low-risk, and need someone to advocate
155254
for and shepherd through the backport.
156255

157-
The only changes to be backported to 2.2.N-doc are changes to
158-
``doc``, ``examples``, or ``tutorials``. Any changes to
159-
``lib`` or ``src`` should not be backported to this branch.
256+
The only changes to be backported to the documentation branch (*v3.N.M-doc*)
257+
are changes to :file:`doc`, :file:`examples`, or :file:`tutorials`.
258+
Any changes to :file:`lib` or :file:`src` including docstring-only changes
259+
should not be backported to this branch.
260+
160261

161262
.. _automated-backports:
162263

@@ -178,6 +279,8 @@ If the bot is not working as expected, please report issues to
178279
`Meeseeksdev <https://github.com/MeeseeksBox/MeeseeksDev>`__.
179280

180281

282+
.. _manual-backports:
283+
181284
Manual backports
182285
----------------
183286

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.