forked from jelmer/dulwich
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONTRIBUTING
51 lines (39 loc) · 1.97 KB
/
CONTRIBUTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
All functionality should be available in pure Python. Optional C
implementations may be written for performance reasons, but should never
replace the Python implementation. The C implementations should follow the
kernel/git coding style.
Where possible include updates to NEWS along with your improvements.
New functionality and bug fixes should be accompanied by matching unit tests.
Coding style
------------
Where possible, please follow PEP8 with regard to coding style.
Furthermore, triple-quotes should always be """, single quotes are ' unless
using " would result in less escaping within the string.
Public methods, functions and classes should all have doc strings. Please use
epydoc style docstrings to document parameters and return values.
You can generate the documentation by running "make doc".
Running the tests
-----------------
To run the testsuite, you should be able to simply run "make check". This
will run the tests using unittest on Python 2.7 and higher, and using
unittest2 (which you will need to have installed) on older versions of Python.
$ make check
String Types
------------
Like Linux, Git treats filenames as arbitrary bytestrings. There is no prescribed
encoding for these strings, and although it is fairly common to use UTF-8, any
raw byte strings are supported.
For this reason, Dulwich internally treats git-based filenames as bytestrings. It is up
to the Dulwich API user to encode and decode them if necessary.
* git-repository related filenames: bytes
* object sha1 digests (20 bytes long): bytes
* object sha1 hexdigests (40 bytes long): str (bytestrings on python2, strings on python3)
Merge requests
--------------
Please either send pull requests to the author ([email protected]) or create new pull
requests on GitHub.
Licensing
---------
Dulwich is currently licensed under the GNU General Public License, version 2
or later. We would like to change the license to Apachev2 or later eventually;
new contributions should be made under dual GPLv2+/Apachev2+.