summaryrefslogtreecommitdiff
path: root/doc/DEVELOPERS.txt
blob: dd86d22ddf142ae18ab6a511c66c0f32f1555376 (plain)
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
52
53
54
Development guidelines for Test Repository
++++++++++++++++++++++++++++++++++++++++++

Coding style
~~~~~~~~~~~~

PEP-8 please. We don't enforce a particular style, but being reasonably 
consistent aids readability.

Copyrights and licensing
~~~~~~~~~~~~~~~~~~~~~~~~

Code committed to Test Repository must be licensed under the BSD + Apache-2.0
licences that Test Repository offers its users. Copyright assignment is not
required. Please see COPYING for details about how to make a license grant in
a given source file. Lastly, all copyright holders need to add their name
to the master list in COPYING the first time they make a change in a given
calendar year.

Testing and QA
~~~~~~~~~~~~~~

For Test repository please add tests where possible. There is no requirement
for one test per change (because somethings are much harder to automatically
test than the benfit from such tests). Fast tests are preferred to slow tests,
and understandable tests to fast tests.

http://build.robertcollins.net/ has a job testing every commit made to trunk
of Test Repository, and there is no automated test-before-merge process at the
moment. The quid pro quo for committers is that they should check that the
automated job found their change acceptable after merging it, and either roll
it back or fix it immediately. A broken trunk is not acceptable!

See DESIGN.txt for information about code layout which will help you find
where to add tests (and indeed where to change things).

Running the tests
-----------------

Generally just ``make`` is all that is needed to run all the tests. However
if dropping into pdb, it is currently more convenient to use
``python -m testtools.run testrepository.tests.test_suite``.

Diagnosing issues
-----------------

The cli UI will drop into pdb when an error is thrown if TESTR_PDB is set in
the environment. This can be very useful for diagnosing problems.

Releasing
---------

Update NEWS and testrepository/__init__.py version numbers. Release to pypi.
Pivot the next milestone on LP to version, and make a new next milestone.