1
.. IVLE - Informatics Virtual Learning Environment
2
Copyright (C) 2007-2009 The University of Melbourne
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.
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.
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
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
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::
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
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
55
Developers who are not members of the
56
`ivle-dev team <https://launchpad.net/~ivle-dev>`_ will not be able to
57
commit to ``lp:ivle``. However, contributions are still welcome. External
58
developers with a patch or new feature should create a branch named
59
:samp:`lp:~{your-name}/ivle/{branch-name}`, and make a Launchpad merge proposal
60
to ``lp:ivle`` when ready. Regular contributors may be invited to the core team
61
on a case-by-case basis.
63
All associated branches can be found on the `IVLE project page on Launchpad
64
<https://launchpad.net/ivle>`_.
69
`Bazaar in five minutes <http://doc.bazaar.canonical.com/latest/en/mini-tutorial/>`_
70
A quick introduction to Bazaar's core functionality.
75
IVLE has a small (but growing) set of test cases. After making any significant
76
changes to the codebase developers are strongly recommended to run the test
77
suite and, if a test fails, correct their code or fix the test case.
79
IVLE currently uses `nose
80
<http://somethingaboutorange.com/mrl/projects/nose/>`_ for its test suite. For
81
simple functions the easiest way of writing a test is to use the `doctests
82
<http://docs.python.org/library/doctest.html>`_ style of test markup. The
83
``nosetests`` script will automatically detect and run these test cases. For
84
more complex tests, you will probably need to write a test module. Test
85
modules are any module with a name of the form ``test_MODULENAME.py``. Any
86
function with the word 'test' in it's name will be run and should throw an
87
exception or fail an assert if the test case fails.
89
To run the test suite either run the ``ivle-testsuite`` script from
90
``lp:~ivle-dev/ivle/dev-scripts`` or run ``IVLECONF="." nosetests`` in the top
91
level directory of an IVLE checkout.
95
IVLE is licenced under the `GNU General Public License Version 2.0
96
<http://www.gnu.org/licenses/gpl-2.0.html>`_ and requires that all
97
contributions be made under it or a compatible license. Code contributions
98
should also contain a header of the following form::
100
# IVLE - Informatics Virtual Learning Environment
101
# Copyright (C) 2007-2010 The University of Melbourne
103
# This program is free software; you can redistribute it and/or modify
104
# it under the terms of the GNU General Public License as published by
105
# the Free Software Foundation; either version 2 of the License, or
106
# (at your option) any later version.
108
# This program is distributed in the hope that it will be useful,
109
# but WITHOUT ANY WARRANTY; without even the implied warranty of
110
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111
# GNU General Public License for more details.
113
# You should have received a copy of the GNU General Public License
114
# along with this program; if not, write to the Free Software
115
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA