|
5 | 5 |
|
6 | 6 | ## Introduction |
7 | 7 |
|
8 | | -Amazing! We are super excited that you have decided to develop, and even contribute to, stdlib, and we welcome you to the stdlib developer community. We have done our best to provide a complete environment for testing, benchmarking, documenting, and developing project code. And if you have any ideas as to how we can make it better, let us know! |
9 | | - |
10 | | -While this guide focuses on technical development, if you are looking to contribute to the project but are non-technical, you can still contribute! For example, you can contribute by filing issues, writing RFCs (feature requests), updating documentation, providing build and infrastructure support, offering [funding][patreon], and helping market and promote the project, among other things. Every bit helps, and we are grateful for your time and effort! |
| 8 | +Amazing! We are super excited that you have decided to develop stdlib, and we welcome you to the stdlib developer community. We have done our best to provide a complete environment for testing, benchmarking, documenting, and developing project code. And if you have any ideas as to how we can make it better, let us know! |
11 | 9 |
|
12 | 10 | Before we begin, developing stdlib requires some setup and configuration. What follows is an overview of environment requirements and a sequence of steps for getting up and running with stdlib. We use [Git][git] for version control, and for most tasks, we use [GNU make][gnu-make] (the original task runner) to help us get things done quickly and effectively. For the most part, the project is able to internally manage dependencies for testing, benchmarking, and linting, so, once you follow the steps below, you should be ready to start developing! |
13 | 11 |
|
@@ -245,69 +243,21 @@ and examples |
245 | 243 | $ make EXAMPLES_FILTER=.*/<pattern>/.* examples |
246 | 244 | ``` |
247 | 245 |
|
248 | | - |
249 | 246 | ## Contributing |
250 | 247 |
|
251 | | -Before contributing, be sure to |
252 | | - |
253 | | -* read and understand the [Code of Conduct][stdlib-code-of-conduct]. |
254 | | -* read and understand the [licensing terms][stdlib-license]. |
255 | | -* read and understand the [style guides][stdlib-style-guides]. |
256 | | - |
257 | | -If you want to contribute a new package to stdlib, be sure to |
258 | | - |
259 | | -* read the [package development guide][stdlib-docs]. |
260 | | - |
261 | | -Next, take a look around the project, noting the style and organization of documentation, tests, examples, benchmarks, and source implementations. Consistency is highly __prioritized__ within stdlib. Thus, the more you are able to match and adhere to project conventions and style, the more likely your contribution will be accepted. While we have done our best to automate linting and style guidelines, such automation is not perfect and cannot adequately capture the inevitable exceptions and nuance to many rules. In short, the more you study existing practice, the better prepared you will be to contribute to stdlib. |
262 | | - |
263 | | -For modifications intended to be included in stdlib, create a new local branch. |
264 | | - |
265 | | -``` bash |
266 | | -$ git checkout -b <branch> |
267 | | -``` |
268 | | - |
269 | | -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. |
270 | | - |
271 | | -During development, to incorporate recent changes from the upstream repository, 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: 1) interleaved histories make [squashing][git-rewriting-history] commits more difficult and 2) a standard merge increases the risk of incomplete/broken commits appearing in the git history. An ideal commit history is one in which, at no point in time, is the project in a broken state. While not always possible (mistakes happen), striving for this ideal facilitates time travel and software archeology. |
272 | | - |
273 | | -Before opening a [pull request][github-pull-request] on the upstream repository, run project tests to ensure that the changes introduced have not left the repository in a broken state. |
274 | | - |
275 | | -``` bash |
276 | | -$ make test |
277 | | -$ make examples |
278 | | -$ make benchmark |
279 | | -``` |
280 | | - |
281 | | -Note that each of the above tasks can take considerable time (>30 minutes per task). |
282 | | - |
283 | | -Once your contribution is ready to be incorporated in the upstream repository, open a [pull request][github-pull-request] against the `develop` branch. A project contributor will review the contribution, provide feedback, and potentially request changes. 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. |
284 | | - |
285 | | -Note that, once a [pull request][github-pull-request] has been made (i.e., your local repository commits have been pushed to a remote server), you should __not__ perform any further [rewriting][git-rewriting-history] of git history. 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. |
286 | | - |
287 | | -Once merged, __congratulations__! You are an official contributor to stdlib! |
288 | | - |
289 | | -Phew. While the above may be a lot to remember, even for what seem like minor changes, eventually it becomes routine and part of the normal development flow. Part of the motivation for enforcing process is to ensure that all code contributions meet a certain quality threshold, thus helping reviewers focus less on non-substantive issues like style and failing tests and more on substantive issues such as contribution content and merit. Know that your patience, hard work, time, and effort are greatly appreciated! |
| 248 | +For contribution guidelines, see the [contributing guide][stdlib-contributing]. |
290 | 249 |
|
291 | 250 |
|
292 | 251 | <section class="links"> |
293 | 252 |
|
294 | | -[patreon]: https://www.patreon.com/athan |
| 253 | +[stdlib-contributing]: https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md |
295 | 254 |
|
296 | 255 | [github-fork]: https://help.github.com/articles/fork-a-repo/ |
297 | 256 | [github-fork-sync]: https://help.github.com/articles/syncing-a-fork/ |
298 | 257 | [github-remote]: https://help.github.com/articles/configuring-a-remote-for-a-fork/ |
299 | | -[github-pull-request]: https://help.github.com/articles/creating-a-pull-request/ |
300 | 258 |
|
301 | 259 | [git-clone-depth]: https://git-scm.com/docs/git-clone#git-clone---depthltdepthgt |
302 | 260 | [git-remotes]: https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes |
303 | | -[git-rebase]: https://git-scm.com/docs/git-rebase |
304 | | -[git-merge]: https://git-scm.com/docs/git-merge |
305 | | -[git-rewriting-history]: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History |
306 | | - |
307 | | -[stdlib-code-of-conduct]: https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md |
308 | | -[stdlib-license]: https://github.com/stdlib-js/stdlib/blob/develop/LICENSE |
309 | | -[stdlib-style-guides]: https://github.com/stdlib-js/stdlib/blob/develop/docs/style-guides |
310 | | -[stdlib-docs]: https://github.com/stdlib-js/stdlib/blob/develop/docs |
311 | 261 |
|
312 | 262 | [git]: http://git-scm.com/ |
313 | 263 | [gnu-make]: https://www.gnu.org/software/make |
|
0 commit comments