1 # CONTRIBUTING GUIDELINES
3 Here are some guidelines for people who want to contribute their code
6 ## Make separate commits for logically separate changes.
8 ## Be picky about whitespace
10 This project is very picky about code style.
11 The style here is the standard Python PEP-8 style:
13 http://www.python.org/dev/peps/pep-0008/
15 * We use 4-space indents.
17 * We use variable_names_with_underscores. No camelCase.
18 The only exception is when overriding Qt functions.
20 * Do not introduce trailing whitespace. The "Diff" viewer displays
21 trailing whitespace in red, or you can use "git diff --check".
23 * Generally, follow the same style as the existing code.
25 ## Describe your changes well.
27 The first line of the commit message should be a short description (50
28 characters is the soft limit, see DISCUSSION in git-commit(1)), and
29 should skip the full stop. It is also conventional in most cases to
30 prefix the first line with "area: " where the area is a filename or
31 identifier for the general area of the code being modified, e.g.
33 * push: allow pushing to multiple remotes
35 * grep: allow passing in command-line arguments
37 If in doubt which identifier to use, run "git log --no-merges" on the
38 files you are modifying to see the current conventions.
40 The body should provide a meaningful commit message, which:
42 * explains the problem the change tries to solve, iow, what is wrong
43 with the current code without the change.
45 * justifies the way the change solves the problem, iow, why the
46 result with the change is better.
48 * alternate solutions considered but discarded, if any.
50 Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
51 instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
52 to do frotz", as if you are giving orders to the codebase to change
53 its behaviour. Try to make sure your explanation can be understood
54 without external resources. Instead of giving a URL to a mailing list
55 archive, summarize the relevant points of the discussion.
57 If you like, you can put extra tags at the end:
59 * "Reported-by:" is used to credit someone who found the bug that
60 the patch attempts to fix.
62 * "Acked-by:" says that the person who is more familiar with the area
63 the patch attempts to modify liked the patch.
65 * "Reviewed-by:", unlike the other tags, can only be offered by the
66 reviewer and means that she is completely satisfied that the patch
67 is ready for application. It is usually offered only after a
70 * "Tested-by:" is used to indicate that the person applied the patch
71 and found it to have the desired effect.
73 You can also create your own tag or use one that's in common usage
74 such as "Thanks-to:", "Based-on-patch-by:", or "Helped-by:".
78 To improve tracking of who did what, we've borrowed the
79 "sign-off" procedure from the Linux kernel project on patches
80 that are being emailed around. Although core Git is a lot
81 smaller project it is a good discipline to follow it.
83 The sign-off is a simple line at the end of the explanation for
84 the patch, which certifies that you wrote it or otherwise have
85 the right to pass it on as a open-source patch. The rules are
86 pretty simple: if you can certify the below:
88 Developer's Certificate of Origin 1.1
90 By making a contribution to this project, I certify that:
92 (a) The contribution was created in whole or in part by me and I
93 have the right to submit it under the open source license
94 indicated in the file; or
96 (b) The contribution is based upon previous work that, to the best
97 of my knowledge, is covered under an appropriate open source
98 license and I have the right under that license to submit that
99 work with modifications, whether created in whole or in part
100 by me, under the same open source license (unless I am
101 permitted to submit under a different license), as indicated
104 (c) The contribution was provided directly to me by some other
105 person who certified (a), (b) or (c) and I have not modified
108 (d) I understand and agree that this project and the contribution
109 are public and that a record of the contribution (including all
110 personal information I submit with it, including my sign-off) is
111 maintained indefinitely and may be redistributed consistent with
112 this project or the open source license(s) involved.
114 then you just add a line saying
116 Signed-off-by: Random J Developer <random@developer.example.org>
118 This line can be automatically added by Git if you run the git-commit
119 command with the -s option.
121 Notice that you can place your own Signed-off-by: line when
122 forwarding somebody else's patch with the above rules for
123 D-C-O. Indeed you are encouraged to do so. Do not forget to
124 place an in-body "From: " line at the beginning to properly attribute
125 the change to its true author (see (2) above).
127 Also notice that a real name is used in the Signed-off-by: line. Please
128 don't hide your real name.
130 ## Fork the repo on Github and create a pull request.