Contribute

Version 1 (Richy, 23/05/2014 13:33)

1 1 Richy
h1. Contribute
2 1 Richy
3 1 Richy
{{>toc}}
4 1 Richy
5 1 Richy
If you've got a code change that fixes something or adds a feature, we'd love to see it. Go on and "fork":https://help.github.com/articles/fork-a-repo "libavg":https://github.com/libavg/libavg and send us a "pull request":https://help.github.com/articles/creating-a-pull-request (PR) with your changes.
6 1 Richy
The PR should apply cleanly to the current master.
7 1 Richy
8 1 Richy
h1. Coding Conventions
9 1 Richy
10 1 Richy
Please follow the [[CodingConventions|Coding Conventions]].
11 1 Richy
12 1 Richy
h1. Running the Tests
13 1 Richy
14 1 Richy
libavg contains a number of tests that run automatically and alert the user if anything doesn't work as expected. The tests are actually pretty comprehensive and find a lot of issues that would otherwise slip through the cracks. To run the tests, do a @make check@. The tests that have to do with images will save images for the failing tests in a @resultimages/@ subdirectory. For each failed test, there will be three images: the current result, the expected result, and a diference image - giving you a good clue about what's happening.
15 1 Richy
16 1 Richy
If you add a feature, please add a test (or several) that make sure the feature works. If you fix a bug, then there should often have been a test that finds the bug ;-), and it's appreciated if you add an appropriate test as well. (That also makes the bug reproducible, thus making your fix more likely to be applied).
17 1 Richy
18 1 Richy
h1. Adding Documentation
19 1 Richy
20 1 Richy
If the patch changes the interface of libavg, we need an update to the reference documentation in libavg/sphinxdoc. To build the documentation, you need "Sphinx":http://sphinx.pocoo.org/ installed:
21 1 Richy
22 1 Richy
<pre><code class="shell">
23 1 Richy
$ sudo easy_install -U Sphinx
24 1 Richy
</code></pre>
25 1 Richy
26 1 Richy
The docs can be rebuilt by calling
27 1 Richy
28 1 Richy
<pre><code class="shell">
29 1 Richy
$ cd libavg
30 1 Richy
$ ./makedocs.sh
31 1 Richy
</code></pre>
32 1 Richy
33 1 Richy
Note that documentation is ordered alphabetically. This is not enforced by sphinx, so new entries must be inserted in order.
34 1 Richy
35 1 Richy
h1. Checkin Granularity
36 1 Richy
37 1 Richy
Please make sure to create one PR per feature/bugfix. Commit messages should be concise and meaningful, usually written in imperative form.
38 1 Richy
For instance
39 1 Richy
<pre>
40 1 Richy
Fix spelling mistake in player documentation
41 1 Richy
</pre>
42 1 Richy
43 1 Richy
rather then
44 1 Richy
<pre>
45 1 Richy
Fixed stuff in doc
46 1 Richy
</pre>
47 1 Richy
48 1 Richy
h1. Patches
49 1 Richy
50 1 Richy
You have created an awsome bugfix or feature to libavg but don't want to create a github account?
51 1 Richy
Open a topic in the forum and attach your patch to it.