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

« back to all changes in this revision

Viewing changes to doc/dev/coding.rst

  • Committer: David Coles
  • Date: 2010-08-30 03:26:13 UTC
  • Revision ID: coles.david@gmail.com-20100830032613-d14vng0jkelniu3l
python-console: Fix globals broken with new JSON library.

simplejson always returns unicode strings. cJSON would return ordinary strings 
if possible. cPickle.loads() only accepts strings. At present we use pickle 
version 0 so they should all works as ASCII strings. Higher versions of pickle 
are not plain ASCII and are likely to break this and so this should be fixed 
at some point.

Also replaced unconditional exception with one that catches Pickle errors. Not 
sure the best way to report failures of these functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
:samp:`lp:~ivle-dev/ivle/{branch-name}` and then merged into the trunk when 
53
53
complete.
54
54
 
55
 
Developers who are not members of the ``ivle-dev`` team will not be able to
 
55
Developers who are not members of the
 
56
`ivle-dev team <https://launchpad.net/~ivle-dev>`_ will not be able to
56
57
commit to ``lp:ivle``. However, contributions are still welcome. External
57
58
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
 
Licence
 
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.
 
62
 
 
63
All associated branches can be found on the `IVLE project page on Launchpad
 
64
<https://launchpad.net/ivle>`_.
 
65
 
 
66
 
 
67
.. seealso::
 
68
 
 
69
   `Bazaar in five minutes <http://doc.bazaar.canonical.com/latest/en/mini-tutorial/>`_
 
70
      A quick introduction to Bazaar's core functionality.
 
71
 
 
72
 
 
73
Test Suite
 
74
==========
 
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.
 
78
 
 
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.
 
88
 
 
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.
 
92
 
 
93
License
66
94
=======
67
95
IVLE is licenced under the `GNU General Public License Version 2.0 
68
96
<http://www.gnu.org/licenses/gpl-2.0.html>`_ and requires that all 
70
98
should also contain a header of the following form::
71
99
 
72
100
    # IVLE - Informatics Virtual Learning Environment
73
 
    # Copyright (C) 2007-2009 The University of Melbourne
 
101
    # Copyright (C) 2007-2010 The University of Melbourne
74
102
    #
75
103
    # This program is free software; you can redistribute it and/or modify
76
104
    # it under the terms of the GNU General Public License as published by