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
+ Summary for PR authors
10
11
======================
11
12
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:
14
49
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 :
18
71
19
72
Documentation
20
73
-------------
@@ -38,24 +91,25 @@ Documentation
38
91
* If you change the API in a backward-incompatible way, please
39
92
document it in :file: `doc/api/api_changes.rst `.
40
93
41
- PR Review guidelines
42
- ====================
94
+ .. _pr-labels :
43
95
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
+ ------
49
98
50
99
* If you have the rights to set labels, tag the PR with descriptive labels.
51
100
See the `list of labels <https://github.com/matplotlib/matplotlib/labels >`__.
52
101
102
+ .. _pr-milestones :
103
+
104
+ Milestones
105
+ ----------
106
+
53
107
* Set the milestone according to these rules:
54
108
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
56
110
``v3.X.0 ``.
57
111
58
- * *Bugfixes and docstring changes * are milestoned for the next bugfix
112
+ * *Bugfixes and docstring changes * are milestoned for the next patch
59
113
release ``v3.X.Y ``
60
114
61
115
* *Documentation changes * (all .rst files and examples) are milestoned
@@ -67,6 +121,11 @@ PR Review guidelines
67
121
an :ref: `automatic backport <automated-backports >` for milestones which have
68
122
a corresponding branch.
69
123
124
+ .. _pr-merging :
125
+
126
+ Merging
127
+ -------
128
+
70
129
* Documentation and examples may be merged by the first reviewer. Use
71
130
the threshold "is this better than it was?" as the review criteria.
72
131
@@ -95,6 +154,11 @@ PR Review guidelines
95
154
A core dev should only champion one PR at a time and we should try to keep
96
155
the flow of championed PRs reasonable.
97
156
157
+ .. _pr-automated-tests :
158
+
159
+ Automated tests
160
+ ---------------
161
+
98
162
* Make sure the Travis, Appveyor, CircleCI, and codecov tests are passing
99
163
before merging.
100
164
@@ -107,6 +171,11 @@ PR Review guidelines
107
171
when another reviewer explicitly allows it (ex, "Approve modulo CI
108
172
passing, may self merge when green").
109
173
174
+ .. _pr-squashing :
175
+
176
+ Number of commits and squashing
177
+ -------------------------------
178
+
110
179
* Squashing is case-by-case. The balance is between burden on the
111
180
contributor, keeping a relatively clean history, and keeping a
112
181
history usable for bisecting. The only time we are really strict
@@ -126,37 +195,68 @@ PR Review guidelines
126
195
with the contributor first.
127
196
128
197
198
+ .. _branches_and_backports :
199
+
129
200
Branches and Backports
130
201
======================
131
202
132
-
203
+ Current branches
204
+ ----------------
133
205
The current active branches are
134
206
135
207
*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.
137
218
138
219
*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+.
140
221
141
222
*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.
144
233
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.
145
238
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 *):
147
245
148
246
- critical bug fixes (segfault, failure to import, things that the
149
247
user can not work around)
150
- - fixes for regressions against 2.0 or 2.1
248
+ - fixes for regressions against the last two releases.
151
249
152
- Everything else (regressions against 1.x versions , bugs/api
250
+ Everything else (regressions against older releases , bugs/api
153
251
inconsistencies the user can work around in their code) are on a
154
252
case-by-case basis, should be low-risk, and need someone to advocate
155
253
for and shepherd through the backport.
156
254
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
+
160
260
161
261
.. _automated-backports :
162
262
@@ -178,6 +278,8 @@ If the bot is not working as expected, please report issues to
178
278
`Meeseeksdev <https://github.com/MeeseeksBox/MeeseeksDev >`__.
179
279
180
280
281
+ .. _manual-backports :
282
+
181
283
Manual backports
182
284
----------------
183
285
0 commit comments