~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to doc/dev/coding.rst

  • Committer: William Grant
  • Date: 2009-02-27 05:07:09 UTC
  • Revision ID: grantw@unimelb.edu.au-20090227050709-k16kvhyl50nzjbwm
Subject URLs now contain the short name (eg. info1) rather than the code
(eg. 600151).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. IVLE - Informatics Virtual Learning Environment
2
 
   Copyright (C) 2007-2009 The University of Melbourne
3
 
 
4
 
.. This program is free software; you can redistribute it and/or modify
5
 
   it under the terms of the GNU General Public License as published by
6
 
   the Free Software Foundation; either version 2 of the License, or
7
 
   (at your option) any later version.
8
 
 
9
 
.. This program is distributed in the hope that it will be useful,
10
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
   GNU General Public License for more details.
13
 
 
14
 
.. You should have received a copy of the GNU General Public License
15
 
   along with this program; if not, write to the Free Software
16
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 
 
18
 
*************
19
 
Coding Policy
20
 
*************
21
 
 
22
 
Code Style
23
 
==========
24
 
IVLE is mostly written in the Python programming language. As such, code 
25
 
should follow the standards set forward in :pep:`8`. It is particularly 
26
 
important that code uses a uniform indentation style otherwise this may cause 
27
 
unusual behavior or make the code difficult to understand. This means that 
28
 
code should be written with 4 spaces per indent and not use any tabs for 
29
 
indentation.
30
 
 
31
 
IVLE also includes a modest quantity of code written in other languages such 
32
 
as JavaScript, HTML and C. In languages that use braces to delimit code blocks 
33
 
the Allman style of indentation is used::
34
 
 
35
 
    while (x == y)
36
 
    {
37
 
        something();
38
 
        somethingelse();
39
 
    }
40
 
    finalthing();
41
 
 
42
 
If in doubt, follow the existing coding style used in the module. Having a 
43
 
consistent coding style is often of far greater value than choosing any one 
44
 
style over another.
45
 
 
46
 
Version Control
47
 
===============
48
 
Code is developed on `Launchpad <https://launchpad.net/>`_ using the `Bazaar 
49
 
<http://bazaar-vcs.org/>`_ version control system. The main branch for 
50
 
development ``lp:ivle``, though more complex features or large changes should 
51
 
be developed in a separate branch with the name
52
 
:samp:`lp:~ivle-dev/ivle/{branch-name}` and then merged into the trunk when 
53
 
complete.
54
 
 
55
 
Developers who are not members of the ``ivle-dev`` team will not be able to
56
 
commit to ``lp:ivle``. However, contributions are still welcome. External
57
 
developers with a patch or new feature should create a branch named
58
 
:samp:`lp:~{your-name}/ivle/{branch-name}`, and make a merge request to
59
 
``lp:ivle`` when ready. Regular contributors may be invited to ``ivle-dev`` on
60
 
a case-by-case basis.
61
 
 
62
 
All associated branches can be found on the `IVLE Launchpad Project Page 
63
 
<https://launchpad.net/ivle/>`_.
64
 
 
65
 
License
66
 
=======
67
 
IVLE is licenced under the `GNU General Public License Version 2.0 
68
 
<http://www.gnu.org/licenses/gpl-2.0.html>`_ and requires that all 
69
 
contributions be made under it or a compatible license. Code contributions 
70
 
should also contain a header of the following form::
71
 
 
72
 
    # IVLE - Informatics Virtual Learning Environment
73
 
    # Copyright (C) 2007-2009 The University of Melbourne
74
 
    #
75
 
    # This program is free software; you can redistribute it and/or modify
76
 
    # it under the terms of the GNU General Public License as published by
77
 
    # the Free Software Foundation; either version 2 of the License, or
78
 
    # (at your option) any later version.
79
 
    #
80
 
    # This program is distributed in the hope that it will be useful,
81
 
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
82
 
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
83
 
    # GNU General Public License for more details.
84
 
    #
85
 
    # You should have received a copy of the GNU General Public License
86
 
    # along with this program; if not, write to the Free Software
87
 
    # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
88
 
 
89