Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 558e74a

Browse files
committed
Update PR guidelines
1 parent eb9b0d5 commit 558e74a

File tree

1 file changed

+133
-31
lines changed

1 file changed

+133
-31
lines changed

doc/devel/coding_guide.rst

Lines changed: 133 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,73 @@
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+
Summary for PR authors
1011
======================
1112

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

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.
50+
* Is the feature / bugfix reasonable?
51+
* Does the PR conform with the :ref:`coding_guidelines`?
52+
* Is the :ref:`documentation <pr-documentation>` (docstrings, examples,
53+
what's new, API changes) updated?
54+
55+
Organizational topics:
56+
57+
* Make sure all :ref:`automated tests <pr-automated-tests>` pass.
58+
* The PR should :ref:`target the master branch <pr-branch-selection>`.
59+
* Tag with descriptive :ref:`labels <pr-labels>`.
60+
* Set the :ref:`milestone <pr-milestones>`.
61+
* Keep an eye on the :ref:`number of commits <pr-squashing>`.
62+
* Approve if all of the above topics handled.
63+
* :ref:`Merge <pr-merging>` if a sufficient number of approvals is reached.
64+
65+
.. _pr-guidelines-details:
66+
67+
Detailed Guidelines
68+
===================
69+
70+
.. _pr-documentation:
1871

1972
Documentation
2073
-------------
@@ -38,24 +91,25 @@ Documentation
3891
* If you change the API in a backward-incompatible way, please
3992
document it in :file:`doc/api/api_changes.rst`.
4093

41-
PR Review guidelines
42-
====================
94+
.. _pr-labels:
4395

44-
* Be patient and `kind <https://youtu.be/tzFWz5fiVKU?t=49m30s>`__ with
45-
contributors.
46-
47-
* If you have commit rights, then you are trusted to use them. Please
48-
help review and merge PRs!
96+
Labels
97+
------
4998

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

102+
.. _pr-milestones:
103+
104+
Milestones
105+
----------
106+
53107
* Set the milestone according to these rules:
54108

55-
* *New features and API changes* are milestoned for the next point-release
109+
* *New features and API changes* are milestoned for the next minor release
56110
``v3.X.0``.
57111

58-
* *Bugfixes and docstring changes* are milestoned for the next bugfix
112+
* *Bugfixes and docstring changes* are milestoned for the next patch
59113
release ``v3.X.Y``
60114

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

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

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

157+
.. _pr-automated-tests:
158+
159+
Automated tests
160+
---------------
161+
98162
* Make sure the Travis, Appveyor, CircleCI, and codecov tests are passing
99163
before merging.
100164

@@ -107,6 +171,11 @@ PR Review guidelines
107171
when another reviewer explicitly allows it (ex, "Approve modulo CI
108172
passing, may self merge when green").
109173

174+
.. _pr-squashing:
175+
176+
Number of commits and squashing
177+
-------------------------------
178+
110179
* Squashing is case-by-case. The balance is between burden on the
111180
contributor, keeping a relatively clean history, and keeping a
112181
history usable for bisecting. The only time we are really strict
@@ -126,37 +195,68 @@ PR Review guidelines
126195
with the contributor first.
127196

128197

198+
.. _branches_and_backports:
199+
129200
Branches and Backports
130201
======================
131202

132-
203+
Current branches
204+
----------------
133205
The current active branches are
134206

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

138219
*v2.2.x*
139-
Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+
220+
Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+.
140221

141222
*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.
223+
Documentation for the current release. On a patch release, this will be
224+
replaced by a properly named branch for the new release.
225+
226+
227+
.. _pr-branch-selection:
228+
229+
Branch selection for pull requests
230+
----------------------------------
231+
232+
Generally, all pull requests should target the master branch.
144233

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

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

148246
- critical bug fixes (segfault, failure to import, things that the
149247
user can not work around)
150-
- fixes for regressions against 2.0 or 2.1
248+
- fixes for regressions against the last two releases.
151249

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

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.
255+
The only changes to be backported to the documentation branch (*v3.N.M-doc*)
256+
are changes to :file:`doc`, :file:`examples`, or :file:`tutorials`.
257+
Any changes to :file:`lib` or :file:`src` including docstring-only changes
258+
should not be backported to this branch.
259+
160260

161261
.. _automated-backports:
162262

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

180280

281+
.. _manual-backports:
282+
181283
Manual backports
182284
----------------
183285

0 commit comments

Comments
 (0)