How to contribute
Version 33 (Daniil Osokin, 2014-07-14 06:01 pm)
1 | 13 | Daniil Osokin | {{>toc}} |
---|---|---|---|
2 | 13 | Daniil Osokin | |
3 | 1 | h1. How to contribute |
|
4 | 1 | ||
5 | 16 | Daniil Osokin | We suppose that you've seen the http://opencv.org/contribute.html page, and now, as an enthusiastic coder, want to contribute some code. For that purpose OpenCV project now has a mirror on the GitHub, to simplify everybody's life! All the bug fixes, new functionality, new tutorials etc. should be submitted via the GitHub's mechanism of pull requests. |
6 | 1 | ||
7 | 16 | Daniil Osokin | If you are not familiar with the mechanism - do not worry, it's very simple. Keep reading. |
8 | 1 | ||
9 | 24 | Daniil Osokin | h2. "Fork & Pull Request model" for code contribution |
10 | 13 | Daniil Osokin | |
11 | 32 | Daniil Osokin | h3. *Short instruction* |
12 | 32 | Daniil Osokin | |
13 | 16 | Daniil Osokin | # Install [[Git]]. |
14 | 16 | Daniil Osokin | # Register at GitHub. Create your fork of OpenCV repository https://github.com/Itseez/opencv (see https://help.github.com/articles/fork-a-repo for details). |
15 | 29 | Daniil Osokin | # Choose a task for youself. It could be a "bugfix":http://www.code.opencv.org/projects/opencv/issues?query_id=5, or some new code. |
16 | 30 | Daniil Osokin | # Choose a base branch for your work. You have two options: |
17 | 30 | Daniil Osokin | ## *2.4* - the branch that will be used for future minor releases in the 2.4.x line. Choose it when fixing a bug that's reproducible in this branch, or when making performance optimizations relevant to it. 2.4 has been feature-frozen; as such, new functionality will _not_ be accepted. |
18 | 30 | Daniil Osokin | ## *master* - the branch that will be used for the next major release of OpenCV (tentatively, 3.0). Choose it when adding new functionality, or for bugfixes/optimizations that don't apply to 2.4. |
19 | 16 | Daniil Osokin | # Create a new branch (with a meaningful name) from the base branch you chose. |
20 | 1 | # Modify/add the code following our [[Coding Style Guide]]. |
|
21 | 32 | Daniil Osokin | # When you are done, push your branch to your GitHub fork; then create a pull request from your branch to the base branch (see https://help.github.com/articles/using-pull-requests for details). |
22 | 1 | ||
23 | 32 | Daniil Osokin | h3. *Links to "step-by-step" guide for popular systems and clients* |
24 | 32 | Daniil Osokin | |
25 | 32 | Daniil Osokin | * [[How to contribute#Windows-7-and-Tortoise-Git|Windows 7 and Tortoise Git]] |
26 | 32 | Daniil Osokin | |
27 | 31 | Daniil Osokin | h2. Making a good pull request |
28 | 31 | Daniil Osokin | |
29 | 31 | Daniil Osokin | Following these guidelines will increase the likelihood of your pull request being accepted: |
30 | 31 | Daniil Osokin | |
31 | 31 | Daniil Osokin | # Scope your PR to one issue. Before submitting, make sure the diff contains no unrelated changes. If you want to cover more than one issue, submit your changes for each as separate pull requests. |
32 | 31 | Daniil Osokin | # If you have added new functionality, you should update/create the relevant documentation, as well as add tests for it to the testsuite. |
33 | 31 | Daniil Osokin | # Try not to include "oops" commits - ones that just fix an error in the previous commit. If you have those, then before submitting "squash":http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits those fixes directly into the commits where they belong. |
34 | 31 | Daniil Osokin | # Make sure to choose the right base branch and to follow the [[Style Guide]] for your code. |
35 | 31 | Daniil Osokin | |
36 | 16 | Daniil Osokin | h2. Testing and merging of pull requests |
37 | 4 | Daniil Osokin | |
38 | 16 | Daniil Osokin | # Your pull request will be automatically tested by OpenCV's buildbot (testing status can be checked here: http://pullrequest.opencv.org). If any builders are failed, you should fix the issue. As you fix the code and push changes to your branch at github, buildbot reruns automatically. _No need to close pull request and open a new one!_ |
39 | 16 | Daniil Osokin | # Once all the builders are "green", one of OpenCV developers will review your code. Reviewer could ask you to modify your pull request. Please provide timely response for reviewers (within weeks, not months), otherwise you submission could be postponed or even rejected. |
40 | 9 | Daniil Osokin | |
41 | 18 | Daniil Osokin | h3. Here is the flow-chart of the process: |
42 | 19 | Daniil Osokin | |
43 | 4 | Daniil Osokin | !https://docs.google.com/drawings/pub?id=1_m7oVQ4CvoMxZn63N1_TyhhazmLLWY5uLEGUyPCERLo&w=960&h=720! |
44 | 4 | Daniil Osokin | |
45 | 16 | Daniil Osokin | h2. Happy End |
46 | 1 | ||
47 | 23 | Daniil Osokin | # As soon as the reviewer is fine with the pull request and BuildBot likes your code, the special comment ":+1:" or ":shipit:" is put, which signals OpenCV maintainers that they can merge your pull request. |
48 | 1 | # The last, but not least. Make sure you got credits. We try to memorize all the contributions and list major ones in the [[ChangeLog]] and release announcements, but we may forget to do that, unintentionally. Please, do not hesitate to remind us, and we will update opencv.org and the ChangeLog accordingly. |
|
49 | 32 | Daniil Osokin | |
50 | 32 | Daniil Osokin | h1. "Step-by-step" guide for popular systems and clients |
51 | 32 | Daniil Osokin | |
52 | 32 | Daniil Osokin | h2. {{anchor|Windows 7 and Tortoise Git}}Windows 7 and Tortoise Git |
53 | 33 | Daniil Osokin | |
54 | 33 | Daniil Osokin | *System configuration:* |
55 | 33 | Daniil Osokin | |
56 | 33 | Daniil Osokin | * Windows 7 x64 bit operating system. |
57 | 33 | Daniil Osokin | * Git 1.8.1 & TortoiseGit 1.8.4. |
58 | 33 | Daniil Osokin | |
59 | 33 | Daniil Osokin | *Prerequisites:* |
60 | 33 | Daniil Osokin | |
61 | 33 | Daniil Osokin | # Register at GitHub. |
62 | 33 | Daniil Osokin | # Download & install "Git":http://code.google.com/p/msysgit/downloads/list. |
63 | 33 | Daniil Osokin | # Download & install "TortoiseGit":http://code.google.com/p/tortoisegit/wiki/Download. |
64 | 33 | Daniil Osokin | |
65 | 33 | Daniil Osokin | Firstly, *configure your GitHub page* to fork the original OpenCV repository: |
66 | 33 | Daniil Osokin | |
67 | 33 | Daniil Osokin | # Go to GitHub. |
68 | 33 | Daniil Osokin | # Open the "Itseez OpenCV page":https://github.com/Itseez/opencv. |
69 | 33 | Daniil Osokin | # Press the fork icon on the right hand top side of the page. |
70 | 33 | Daniil Osokin | !press_fork_button.png! |