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