1
- .. _ reviewers-guide :
1
+ .. _ pr-guidelines :
2
2
3
- ********************
4
- Reviewers guideline
5
- ********************
3
+ ***********************
4
+ Pull request guidelines
5
+ ***********************
6
6
7
- .. _pull-request-checklist :
7
+ Pull requests (PRs) are the mechanism for contributing to Matplotlibs code and
8
+ documentation.
8
9
9
- Pull request checklist
10
+ .. _pr-checklist-authors :
11
+
12
+ Summary for PR authors
10
13
======================
11
14
12
- Branch selection
13
- ----------------
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 the guidelines below as well 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. You may mark these as
35
+ `draft pull requests <https://help.github.com/en/articles/about-pull-requests#draft-pull-requests >`_
36
+ on GitHub.
37
+
38
+ See also :ref: `contributing ` for how to make a PR.
39
+
40
+ .. _pr-checklist-reviewers :
41
+
42
+ Summary for PR reviewers
43
+ ========================
44
+ .. note ::
45
+
46
+ * If you have commit rights, then you are trusted to use them.
47
+ **Please help review and merge PRs! **
48
+ * Be patient and `kind <https://youtu.be/tzFWz5fiVKU?t=49m30s >`__ with
49
+ contributors.
50
+
51
+ Content topics:
14
52
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.
53
+ * Is the feature / bugfix reasonable?
54
+ * Does the PR conform with the :ref: `coding_guidelines `?
55
+ * Is the :ref: `documentation <pr-documentation >` (docstrings, examples,
56
+ what's new, API changes) updated?
57
+
58
+ Organizational topics:
59
+
60
+ * Make sure all :ref: `automated tests <pr-automated-tests >` pass.
61
+ * The PR should :ref: `target the master branch <pr-branch-selection >`.
62
+ * Tag with descriptive :ref: `labels <pr-labels >`.
63
+ * Set the :ref: `milestone <pr-milestones >`.
64
+ * Keep an eye on the :ref: `number of commits <pr-squashing >`.
65
+ * Approve if all of the above topics handled.
66
+ * :ref: `Merge <pr-merging >` if a sufficient number of approvals is reached.
67
+
68
+ .. _pr-guidelines-details :
69
+
70
+ Detailed Guidelines
71
+ ===================
72
+
73
+ .. _pr-documentation :
18
74
19
75
Documentation
20
76
-------------
@@ -38,24 +94,25 @@ Documentation
38
94
* If you change the API in a backward-incompatible way, please
39
95
document it in :file: `doc/api/api_changes.rst `.
40
96
41
- PR Review guidelines
42
- ====================
97
+ .. _pr-labels :
43
98
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!
99
+ Labels
100
+ ------
49
101
50
102
* If you have the rights to set labels, tag the PR with descriptive labels.
51
103
See the `list of labels <https://github.com/matplotlib/matplotlib/labels >`__.
52
104
105
+ .. _pr-milestones :
106
+
107
+ Milestones
108
+ ----------
109
+
53
110
* Set the milestone according to these rules:
54
111
55
- * *New features and API changes * are milestoned for the next point- release
112
+ * *New features and API changes * are milestoned for the next minor release
56
113
``v3.X.0 ``.
57
114
58
- * *Bugfixes and docstring changes * are milestoned for the next bugfix
115
+ * *Bugfixes and docstring changes * are milestoned for the next patch
59
116
release ``v3.X.Y ``
60
117
61
118
* *Documentation changes * (all .rst files and examples) are milestoned
@@ -67,6 +124,11 @@ PR Review guidelines
67
124
an :ref: `automatic backport <automated-backports >` for milestones which have
68
125
a corresponding branch.
69
126
127
+ .. _pr-merging :
128
+
129
+ Merging
130
+ -------
131
+
70
132
* Documentation and examples may be merged by the first reviewer. Use
71
133
the threshold "is this better than it was?" as the review criteria.
72
134
@@ -95,6 +157,11 @@ PR Review guidelines
95
157
A core dev should only champion one PR at a time and we should try to keep
96
158
the flow of championed PRs reasonable.
97
159
160
+ .. _pr-automated-tests :
161
+
162
+ Automated tests
163
+ ---------------
164
+
98
165
* Make sure the Travis, Appveyor, CircleCI, and codecov tests are passing
99
166
before merging.
100
167
@@ -107,6 +174,11 @@ PR Review guidelines
107
174
when another reviewer explicitly allows it (ex, "Approve modulo CI
108
175
passing, may self merge when green").
109
176
177
+ .. _pr-squashing :
178
+
179
+ Number of commits and squashing
180
+ -------------------------------
181
+
110
182
* Squashing is case-by-case. The balance is between burden on the
111
183
contributor, keeping a relatively clean history, and keeping a
112
184
history usable for bisecting. The only time we are really strict
@@ -126,37 +198,68 @@ PR Review guidelines
126
198
with the contributor first.
127
199
128
200
201
+ .. _branches_and_backports :
202
+
129
203
Branches and Backports
130
204
======================
131
205
132
-
206
+ Current branches
207
+ ----------------
133
208
The current active branches are
134
209
135
210
*master *
136
- This will be Matplotlib 3.0. Supports Python 3.5+.
211
+ The current development version. Future minor releases (*v3.N.0 *) will be
212
+ branched from this. Supports Python 3.6+.
213
+
214
+ *v3.N.x *
215
+ Maintenance branch for Matplotlib 3.N. Future patch releases will be
216
+ branched from this. Supports Python 3.6+.
217
+
218
+ *v3.N.M-doc *
219
+ Documentation for the current release. On a patch release, this will be
220
+ replaced by a properly named branch for the new release.
137
221
138
222
*v2.2.x *
139
- Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+
223
+ Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+.
140
224
141
225
*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.
226
+ Documentation for the current release. On a patch release, this will be
227
+ replaced by a properly named branch for the new release.
228
+
229
+
230
+ .. _pr-branch-selection :
231
+
232
+ Branch selection for pull requests
233
+ ----------------------------------
234
+
235
+ Generally, all pull requests should target the master branch.
144
236
237
+ Other branches are fed through :ref: `automatic <automated-backports >` or
238
+ :ref: `manual <manual-backports >`. Directly
239
+ targeting other branches is only rarely necessary for special maintenance
240
+ work.
145
241
146
- We always will backport to 2.2.x
242
+ .. backport_strategy:
243
+
244
+ Backport strategy
245
+ -----------------
246
+
247
+ We will always backport to the patch release branch (*v3.N.x *):
147
248
148
249
- critical bug fixes (segfault, failure to import, things that the
149
250
user can not work around)
150
- - fixes for regressions against 2.0 or 2.1
251
+ - fixes for regressions against the last two releases.
151
252
152
- Everything else (regressions against 1.x versions , bugs/api
253
+ Everything else (regressions against older releases , bugs/api
153
254
inconsistencies the user can work around in their code) are on a
154
255
case-by-case basis, should be low-risk, and need someone to advocate
155
256
for and shepherd through the backport.
156
257
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.
258
+ The only changes to be backported to the documentation branch (*v3.N.M-doc *)
259
+ are changes to :file: `doc `, :file: `examples `, or :file: `tutorials `.
260
+ Any changes to :file: `lib ` or :file: `src ` including docstring-only changes
261
+ should not be backported to this branch.
262
+
160
263
161
264
.. _automated-backports :
162
265
@@ -178,6 +281,8 @@ If the bot is not working as expected, please report issues to
178
281
`Meeseeksdev <https://github.com/MeeseeksBox/MeeseeksDev >`__.
179
282
180
283
284
+ .. _manual-backports :
285
+
181
286
Manual backports
182
287
----------------
183
288
0 commit comments