|
1 | | -# How to Contribute |
| 1 | +# How to contribute |
2 | 2 |
|
3 | | -We'd love to accept your patches and contributions to this project. There are |
4 | | -just a few small guidelines you need to follow. |
| 3 | +We definitely welcome patches and contributions to OpenCensus! Here are |
| 4 | +some guidelines and information about how to do so. |
5 | 5 |
|
6 | | -## Contributor License Agreement |
| 6 | +## Before getting started |
7 | 7 |
|
8 | | -Contributions to this project must be accompanied by a Contributor License |
9 | | -Agreement. You (or your employer) retain the copyright to your contribution, |
10 | | -this simply gives us permission to use and redistribute your contributions as |
11 | | -part of the project. Head over to <https://cla.developers.google.com/> to see |
12 | | -your current agreements on file or to sign a new one. |
13 | | - |
14 | | -You generally only need to submit a CLA once, so if you've already submitted one |
15 | | -(even if it was for a different project), you probably don't need to do it |
16 | | -again. |
| 8 | +In order to protect both you and ourselves, you will need to sign the |
| 9 | +[Contributor License Agreement](https://cla.developers.google.com/clas). |
17 | 10 |
|
18 | 11 | ## Code reviews |
19 | 12 |
|
20 | 13 | All submissions, including submissions by project members, require review. We |
21 | 14 | use GitHub pull requests for this purpose. Consult |
22 | 15 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more |
23 | 16 | information on using pull requests. |
| 17 | + |
| 18 | +## Instructions |
| 19 | + |
| 20 | +Prerequisites: |
| 21 | + |
| 22 | +* You need to have Python installed. |
| 23 | +* You need to fork the project in GitHub. |
| 24 | + |
| 25 | +Clone the upstream repo: |
| 26 | + |
| 27 | +```sh |
| 28 | +$ git clone https://github.com/census-instrumentation/opencensus-python.git |
| 29 | +``` |
| 30 | + |
| 31 | +Add your fork as an origin: |
| 32 | + |
| 33 | +```sh |
| 34 | +$ git remote add fork https://github.com/YOUR_GITHUB_USERNAME/opencensus-python.git |
| 35 | +``` |
| 36 | + |
| 37 | +Run tests: |
| 38 | + |
| 39 | +```sh |
| 40 | +$ pip install nox-automation # Only first time. |
| 41 | +$ nox |
| 42 | +``` |
| 43 | + |
| 44 | +Checkout a new branch, make modifications and push the branch to your fork: |
| 45 | + |
| 46 | +```sh |
| 47 | +$ git checkout -b feature |
| 48 | +# edit files |
| 49 | +$ git commit |
| 50 | +$ git push fork feature |
| 51 | +``` |
| 52 | + |
| 53 | +Open a pull request against the main opencensus-python repo. |
| 54 | + |
| 55 | +### Additional instructions for extension developers |
| 56 | + |
| 57 | +If you want to contribute new [extensions](README.rst#extensions), you need some extra steps: |
| 58 | + |
| 59 | +* Prepare the extension code, put it under the [contrib](./contrib/) folder. |
| 60 | +* Update [nox.py](./nox.py) to include your new extension for testing purpose. |
| 61 | +* Update [README](./README.rst#extensions) to include your extension. |
0 commit comments