| 1 |
# Contributing |
| 2 |
|
| 3 |
This contributing guidelines document is derived from the The Gonum Project's guidelines. |
| 4 |
|
| 5 |
## Working Together |
| 6 |
|
| 7 |
When contributing or otherwise participating please follow the [bíogo community's conduct expectations](CONDUCT.md). |
| 8 |
|
| 9 |
## Reporting Bugs |
| 10 |
|
| 11 |
When you encounter a bug, please open an issue on the corresponding repository. |
| 12 |
Start the issue title with the repository/sub-repository name, like `seq/linear: issue description`. |
| 13 |
Be specific about the environment you encountered the bug in. |
| 14 |
If you are able to write a test that reproduces the bug, please include it in the issue. |
| 15 |
As a rule we keep all tests OK. |
| 16 |
|
| 17 |
## Suggesting Enhancements |
| 18 |
|
| 19 |
If the scope of the enhancement is small, open an issue. |
| 20 |
If it is large, such as suggesting a new package, or interface refactoring, then please start a discussion on [the biogo-dev list](https://groups.google.com/forum/#!forum/biogo-dev). |
| 21 |
|
| 22 |
## Your First Code Contribution |
| 23 |
|
| 24 |
If you are a new contributor, thank you! Before your first merge, you will need to be added to the [CONTRIBUTORS](https://github.com/biogo/biogo/blob/master/CONTRIBUTORS) and [AUTHORS](https://github.com/biogo/biogo/blob/master/AUTHORS) file. |
| 25 |
Open a pull request adding yourself to them. |
| 26 |
All bíogo code follows the BSD license in the [license document](https://github.com/biogo/biogo/blob/master/LICENSE). |
| 27 |
We prefer that code contributions do not come with additional licensing. |
| 28 |
For exceptions, added code must also follow a BSD license. |
| 29 |
|
| 30 |
## Code Contribution |
| 31 |
|
| 32 |
If it is possible to split a large pull request into two or more smaller pull requests, please try to do so. |
| 33 |
Pull requests should include tests for any new code before merging. |
| 34 |
It is ok to start a pull request on partially implemented code to get feedback, and see if your approach to a problem is sound. |
| 35 |
You don't need to have tests, or even have code that compiles to open a pull request, although both will be needed before merge. |
| 36 |
When tests use magic numbers, please include a comment explaining the source of the number. |
| 37 |
Benchmarks are optional for new features, but if you are submitting a pull request justified by performance improvement, you will need benchmarks to measure the impact of your change, and the pull request should include a report from [benchcmp](https://godoc.org/golang.org/x/tools/cmd/benchcmp) or, preferably, [benchstat](https://github.com/rsc/benchstat). |
| 38 |
|
| 39 |
## Code Review |
| 40 |
|
| 41 |
If you are a contributor, please be welcoming to new contributors. [Here](http://sarah.thesharps.us/2014/09/01/the-gentle-art-of-patch-review/) is a good guide. |
| 42 |
|
| 43 |
There are several terms code reviews may use that you should become familiar with. |
| 44 |
|
| 45 |
* ` LGTM ` — looks good to me |
| 46 |
* ` SGTM ` — sounds good to me |
| 47 |
* ` s/foo/bar/ ` — please replace ` foo ` with ` bar `; this is [sed syntax](http://en.wikipedia.org/wiki/Sed#Usage) |
| 48 |
* ` s/foo/bar/g ` — please replace ` foo ` with ` bar ` throughout your entire change |
| 49 |
|
| 50 |
We follow the convention of requiring at least 1 reviewer to say LGTM before a merge. |
| 51 |
When code is tricky or controversial, submitters and reviewers can request additional review from others and more LGTMs before merge. |
| 52 |
You can ask for more review by saying PTAL in a comment in a pull request. |
| 53 |
You can follow a PTAL with one or more @someone to get the attention of particular people. |
| 54 |
If you don't know who to ask, and aren't getting enough review after saying PTAL, then PTAL @biogo/ |
| 55 |
contributors will get more attention. |
| 56 |
Also note that you do not have to be the pull request submitter to request additional review. |
| 57 |
|
| 58 |
## What Can I Do to Help? |
| 59 |
|
| 60 |
If you are looking for some way to help the bíogo project, there are good places to start, depending on what you are comfortable with. |
| 61 |
You can [search](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Abiogo) for open issues in need of resolution. |
| 62 |
You can improve documentation, or improve examples. |
| 63 |
You can add and improve tests. |
| 64 |
You can improve performance, either by improving accuracy, speed, or both. |
| 65 |
You can suggest and implement new features that you think belong in bíogo. |
| 66 |
|
| 67 |
## Style |
| 68 |
|
| 69 |
We use [Go style](https://github.com/golang/go/wiki/CodeReviewComments). |