Skip to content

Commit b033487

Browse files
committed
Add notes and include link to create a GitHub account
1 parent 5581635 commit b033487

File tree

1 file changed

+71
-1
lines changed

1 file changed

+71
-1
lines changed

CONTRIBUTING.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Be aware that the `@` symbol tags users on GitHub, so __always__ surround packag
4343

4444
### Code
4545

46+
> By contributing code to the project, you are agreeing to release it under the project [license][stdlib-license].
47+
4648
__Before__ contributing code, be sure to
4749

4850
* read and understand the [licensing terms][stdlib-license].
@@ -71,6 +73,11 @@ If you are unfamiliar with [git][git], the version control system used by GitHub
7173
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.
7274

7375

76+
#### Step 0: GitHub
77+
78+
Create a [GitHub account][github-signup]. The project uses GitHub exclusively for hosting source code, managing issues and pull requests, triggering continuous integration, and reporting.
79+
80+
7481
#### Step 1: Fork
7582

7683
[Fork][github-fork] the repository on GitHub and clone the repository to your local machine.
@@ -79,7 +86,7 @@ Next, take a look around the project, noting the style and organization of docum
7986
$ git clone https://github.com/<username>/stdlib.git
8087
```
8188

82-
where `<username>` is your GitHub username (assuming you are using GitHub to manage public repositories). The repository has a large commit history, leading to slow download times. If you are not interested in code archeology, you can reduce the download time by limiting the clone [depth][git-clone-depth].
89+
where `<username>` is your GitHub username. The repository has a large commit history, leading to slow download times. If you are not interested in code archeology, you can reduce the download time by limiting the clone [depth][git-clone-depth].
8390

8491
``` bash
8592
$ git clone --depth=<depth> https://github.com/<username>/stdlib.git
@@ -221,6 +228,65 @@ __Congratulations__! You are an official contributor to stdlib! Thank you for yo
221228

222229
## Notes
223230

231+
### GitHub
232+
233+
* When linking to specific lines of code in an issue or a pull request, hit the `y` key while viewing a file on GitHub. Doing so reloads the page with a URL that includes the specific version of the file you are viewing. This ensures that, when you refer to specific lines, these same lines can be easily viewed in the future, even if the content of the file changes.
234+
* GitHub does not send notifications when you push a commit and update a [pull request][github-pull-request], so be sure to comment on the pull request thread to inform reviewers that you have made changes.
235+
236+
237+
### Writing Tests
238+
239+
> By contributing tests to the project, you are agreeing to release it under the project [license][stdlib-license].
240+
241+
The project can __never__ have enough tests. To address areas lacking sufficient test coverage,
242+
243+
1. View the latest [coverage report][stdlib-code-coverage].
244+
245+
1. Browse the source files and find untested functionality highlighted in red.
246+
247+
1. Locate the package containing the source file in your forked repository.
248+
249+
1. Add tests to the package test file(s).
250+
251+
1. To run package tests,
252+
253+
``` bash
254+
$ make TESTS_FILTER=.*/<pattern>/.* test
255+
```
256+
257+
where `<pattern>` is a pattern matching a particular path. For example, to test the base math `sin` package
258+
259+
``` bash
260+
$ make TESTS_FILTER=.*/math/base/special/sin/.*
261+
```
262+
263+
where the pattern `.*/math/base/special/sin/.*` matches any test file whose absolute path contains `math/base/special/sin`.
264+
265+
1. To generate a test coverage report,
266+
267+
``` bash
268+
$ make TESTS_FILTER=.*/<pattern>/.* test-cov
269+
$ make view-cov
270+
```
271+
272+
which opens the coverage report in your default web browser.
273+
274+
1. Submit the test as a [pull request][github-pull-request].
275+
276+
277+
### Writing Documentation
278+
279+
> By contributing documentation to the project, you are agreeing to release it under the project [license][stdlib-license].
280+
281+
Project documentation is localized within each package. Similar to code, you should modify documentation using [git][git]. Provided you have followed the [development guide][stdlib-development] and enabled git hooks,
282+
283+
``` bash
284+
$ make init
285+
```
286+
287+
modified Markdown files are automatically linted prior to each commit. Any changes to documentation files should be free of lint errors. If a [pull request][github-pull-request] includes lint errors, the pull request will __not__ be accepted.
288+
289+
224290
### Continuous Integration
225291

226292
Opening a [pull request][github-pull-request] automatically triggers a continuous integration build. Each pull request update queues an additional build. If a pull request has more than one build queued, only the most recent build in the queue is run.
@@ -247,15 +313,19 @@ Phew. While the above may be a lot to remember, even for what seem like minor ch
247313

248314
[stdlib-code-of-conduct]: https://github.com/stdlib-js/stdlib/blob/develop/CODE_OF_CONDUCT.md
249315
[stdlib-license]: https://github.com/stdlib-js/stdlib/blob/develop/LICENSE
316+
250317
[stdlib-style-guides]: https://github.com/stdlib-js/stdlib/blob/develop/docs/style-guides
251318
[stdlib-development]: https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md
252319
[stdlib-docs]: https://github.com/stdlib-js/stdlib/blob/develop/docs
253320
[stdlib-faq]: https://github.com/stdlib-js/stdlib/blob/develop/FAQ.md
254321

322+
[stdlib-code-coverage]: https://codecov.io/github/stdlib-js/stdlib/branch/develop
323+
255324
[stdlib-gitter]: https://gitter.im/stdlib-js/stdlib
256325

257326
[patreon]: https://www.patreon.com/athan
258327

328+
[github-signup]: https://github.com/signup/free
259329
[github-pull-request]: https://help.github.com/articles/creating-a-pull-request/
260330
[github-gist]: https://gist.github.com/
261331
[github-markdown-guide]: https://guides.github.com/features/mastering-markdown/

0 commit comments

Comments
 (0)