|
1 |
| -### Give me your bugs, your docs, your pull requests... |
| 1 | +### Contributing to the Tern project |
2 | 2 |
|
3 |
| -But before you do, please take a moment to read the code of conduct |
| 3 | +Once again, we hope you have read our [code of conduct](/CODE_OF_CONDUCT.md) before starting. |
4 | 4 |
|
5 |
| -### How to file a bug |
| 5 | +We are excited to be working with the community to help with Open Source compliance obligations! |
6 | 6 |
|
7 |
| -### How to submit new or corrected documentation |
| 7 | +You can contribute in the following ways: |
8 | 8 |
|
9 |
| -### How to submit a pull request |
| 9 | +* Improving the Documentation |
| 10 | +* Adding to the Command Library |
| 11 | +* Improving the Unit and Functional Tests |
| 12 | +* Improving the Core Project |
10 | 13 |
|
11 |
| -### Adding to the Command Library |
| 14 | +### Skills for contributing |
12 | 15 |
|
13 |
| -Link to command library wiki |
| 16 | +* English (not necessarily fluent but workable) |
| 17 | +* Python (a working knowledge of object oriented Python would be nice, but if you know how python functions/modules work, this is enough to get you started) |
| 18 | +* YAML (Tern uses yaml files heavily for data lookup. An overview of YAML can be found [here](http://yaml.org/) |
14 | 19 |
|
15 |
| -### Talk to me! |
| 20 | +### Keeping in touch |
16 | 21 |
|
17 |
| -### Glossary |
| 22 | +If you would like to ask a question or start a discussion with the maintainers, post a topic on the [public forum](https://groups.google.com/forum/#!forum/tern-maintainers). No registration is required. We will respond to your question or topic within three days unless the post was over the weekend in which case we may take longer to respond. This is our primary communication channel so it is highly likely that you will get a response here. |
18 | 23 |
|
| 24 | +If you would like to chat live, you can join the [slack channel](https://vmwarecode.slack.com/messages/tern). If you don't have an @vmware.com or @emc.com email, please sign up at https://code.vmware.com/slack to get a Slack invite. Although we monitor the channel, we may not respond right away and if the same question was asked on the forum, we will choose to respond there. |
| 25 | + |
| 26 | +### An overview of the contribution lifecycle |
| 27 | + |
| 28 | +Once you decide that you would like to play around with the project |
| 29 | + |
| 30 | +1. Fork the git repository to your personal github account. See [here](https://help.github.com/articles/fork-a-repo/#fork-an-example-repository) and [here](https://help.github.com/articles/fork-a-repo/#keep-your-fork-synced) to get you started. |
| 31 | +2. Create a branch for your work |
| 32 | +``` |
| 33 | +$ git checkout -b my-work |
| 34 | +``` |
| 35 | +3. Work on the code |
| 36 | +4. Update your branch with the latest from upstream. See [here](https://help.github.com/articles/syncing-a-fork/) for an example. Note that if you have not worked on the master branch of your fork, the merges should be fast-forward merges and you should not be resolving conflicts. |
| 37 | +5. Replay your work on top of the latest |
| 38 | +``` |
| 39 | +$ git checkout my-work |
| 40 | +$ git rebase master |
| 41 | +``` |
| 42 | +Expect to spend time resolving conflicts here. |
| 43 | +6. Run functional tests. |
| 44 | +6. Push your branch changes to a remote branch in your fork of the repo |
| 45 | +7. Submit a pull request (PR for short) to the upstream repo. See [here](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) to get you started. If all goes well, there should be no conflicts. |
| 46 | +8. A reviewer will further communicate with you through the PR. |
| 47 | +9. If everything looks good the PR will be accepted. |
| 48 | + |
| 49 | +### Commit message format |
| 50 | + |
| 51 | +The commit message of your PR should be able to communicate what problem/opportunity the PR addresses without any reference to forum messages or discussions on slack or IRL. You may make a reference to a github issue number using the github format (eg: Resolves: #1). Here is a summary taken from [this blog](https://chris.beams.io/posts/git-commit/) |
| 52 | + |
| 53 | +* Separate subject from body with a blank line |
| 54 | +* Limit the subject line to 50 characters |
| 55 | +* Capitalize the subject line |
| 56 | +* Do not end the subject line with a period |
| 57 | +* Use the imperative mood in the subject line |
| 58 | +* Wrap the body at 72 characters |
| 59 | +* Use the body to explain what and why vs. how |
| 60 | +``` |
| 61 | +Summarize changes in around 50 characters or less |
| 62 | +
|
| 63 | +More detailed explanatory text, if necessary. Wrap it to about 72 |
| 64 | +characters or so. In some contexts, the first line is treated as the |
| 65 | +subject of the commit and the rest of the text as the body. The |
| 66 | +blank line separating the summary from the body is critical (unless |
| 67 | +you omit the body entirely); various tools like `log`, `shortlog` |
| 68 | +and `rebase` can get confused if you run the two together. |
| 69 | +
|
| 70 | +Explain the problem that this commit is solving. Focus on why you |
| 71 | +are making this change as opposed to how (the code explains that). |
| 72 | +Are there side effects or other unintuitive consequences of this |
| 73 | +change? Here's the place to explain them. |
| 74 | +
|
| 75 | +Further paragraphs come after blank lines. |
| 76 | +
|
| 77 | + - Bullet points are okay, too |
| 78 | +
|
| 79 | + - Typically a hyphen or asterisk is used for the bullet, preceded |
| 80 | + by a single space, with blank lines in between, but conventions |
| 81 | + vary here |
| 82 | +
|
| 83 | +If you use an issue tracker, put references to them at the bottom, |
| 84 | +like this: |
| 85 | +
|
| 86 | +Resolves: #123 |
| 87 | +See also: #456, #789 |
| 88 | +``` |
| 89 | +### Filing an Issue |
| 90 | + |
| 91 | +You may file an issue through the github issue tracker. Please follow the same guidelines as the commit message guidelines when formatting your issue. Please make sure to include the following for quick debugging and resolution: |
| 92 | + |
| 93 | +* The SHA256 commit at which the bug occured |
| 94 | +* The project release version |
| 95 | +* Your dev environment |
| 96 | +* Reproduction steps |
| 97 | +* The contents of tern.log (which may not have everything that went to stdout so the contents of that would also be helpful if it is different) |
| 98 | + |
| 99 | +You may file an issue and create a pull request that references said issue. This, however, does not guarantee acceptance of the PR. Contributing in this way works for small bug or documentation fixes but doesn't lend itself well to large updates. We encourage you to start a discussion on the forum. Typically a follow up issue will be created referencing the topic. |
| 100 | + |
| 101 | +### Troubleshooting |
| 102 | + |
| 103 | +* Tern produces a generic message about being unable to execute a docker command with a CalledProcessError from the get go: Make sure the docker daemon is running first |
| 104 | +* Unable to find module 'yaml': make sure to activate the python virtualenv first and then run pip install -r requirements.txt |
0 commit comments