You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize Git hooks to enable automated development processes to run prior to authoring commits and pushing changes.
166
+
167
+
<!-- run-disable -->
168
+
169
+
```bash
170
+
$ make init
171
+
```
172
+
173
+
Note that `make init` only needs to be run once; however, we repeat it below as **not** running it is a common omission by new contributors.
174
+
175
+
#### Step 3: Branch
156
176
157
177
For modifications intended to be included in stdlib, create a new local branch.
158
178
@@ -164,11 +184,11 @@ $ git checkout -b <branch>
164
184
165
185
where `<branch>` is the branch name. Both the `master` and `develop` branches for the main stdlib project are protected, and direct modifications to these branches will **not** be accepted. Instead, all contributions should be made on non-master and non-develop local branches, including documentation changes and other non-code modifications. See the project [branching guide][stdlib-branching] for additional guidance.
166
186
167
-
#### Step 3: Write
187
+
#### Step 4: Write
168
188
169
189
Start making your changes and/or implementing the new feature. Any text you write should follow the [text style guide][stdlib-style-guides-text], including comments and API documentation.
170
190
171
-
#### Step 4: Commit
191
+
#### Step 5: Commit
172
192
173
193
Ensure that you have configured [Git][git] to know your name and email address.
174
194
@@ -190,7 +210,7 @@ $ git commit
190
210
191
211
When writing commit messages, follow the Git [style guide][stdlib-style-guides-git]. Adherence to project commit conventions is necessary for project automation which automatically generates release notes and changelogs from commit messages.
192
212
193
-
#### Step 5: Sync
213
+
#### Step 6: Sync
194
214
195
215
To incorporate recent changes from the `upstream` repository during development, you should [rebase][git-rebase] your local branch, reapplying your local commits on top of the current upstream `HEAD`. This procedure is in contrast to performing a standard [merge][git-merge], which may interleave development histories. The rationale is twofold:
196
216
@@ -206,7 +226,7 @@ $ git fetch upstream
206
226
$ git rebase upstream/develop
207
227
```
208
228
209
-
#### Step 6: Test
229
+
#### Step 7: Test
210
230
211
231
Tests should accompany **all** bug fixes and features. For guidance on how to write tests, consult existing tests within the project.
212
232
@@ -222,7 +242,7 @@ linting should be automatically triggered prior to each commit, and test executi
222
242
223
243
Any [pull requests][github-pull-request] which include failing tests and/or lint errors will **not** be accepted.
224
244
225
-
#### Step 7: Push
245
+
#### Step 8: Push
226
246
227
247
Push your changes to your remote GitHub repository.
228
248
@@ -234,7 +254,7 @@ $ git push origin <branch>
234
254
235
255
where `<branch>` is the name of your branch.
236
256
237
-
#### Step 8: Pull Request
257
+
#### Step 9: Pull Request
238
258
239
259
Once your contribution is ready to be incorporated in the `upstream` repository, open a [pull request][github-pull-request] against the `develop` branch. One or more project contributors will review the contribution, provide feedback, and potentially request changes.
240
260
@@ -280,13 +300,13 @@ $ git commit -m "fixup! feat: add support for computing the absolute value"
280
300
281
301
If the history needs modification, a contributor will modify the history during the merge process. The rationale for **not** rewriting public history is that doing so invalidates the commit history for anyone else who has pulled your changes, thus imposing additional burdens on collaborators to ensure that their local versions match the modified history.
282
302
283
-
#### Step 9: Land
303
+
#### Step 10: Land
284
304
285
305
After any changes have been resolved and continuous integration tests have passed, a contributor will approve a [pull request][github-pull-request] for inclusion in the project. Once merged, the [pull request][github-pull-request] will be updated with the merge commit, and the [pull request][github-pull-request] will be closed.
286
306
287
307
Note that, during the merge process, multiple commits will often be [squashed][git-rewriting-history].
288
308
289
-
#### Step 10: Celebrate
309
+
#### Step 11: Celebrate
290
310
291
311
**Congratulations**! You are an official contributor to stdlib! Thank you for your hard work and patience!
292
312
@@ -316,15 +336,15 @@ The project can **never** have enough tests. To address areas lacking sufficient
316
336
<!-- run-disable -->
317
337
318
338
```bash
319
-
$ make TESTS_FILTER=.*/<pattern>/.*test
339
+
$ make TESTS_FILTER=".*/<pattern>/.*"test
320
340
```
321
341
322
342
where `<pattern>` is a pattern matching a particular path. For example, to test the base math `sin` package
323
343
324
344
<!-- run-disable -->
325
345
326
346
```bash
327
-
$ make TESTS_FILTER=.*/math/base/special/sin/.*test
347
+
$ make TESTS_FILTER=".*/math/base/special/sin/.*"test
328
348
```
329
349
330
350
where the pattern `.*/math/base/special/sin/.*` matches any test file whose absolute path contains `math/base/special/sin`.
@@ -334,7 +354,7 @@ The project can **never** have enough tests. To address areas lacking sufficient
0 commit comments