1 Cone development |
1 .. _cone-development: |
2 ================ |
2 |
|
3 Development with ConE |
|
4 ===================== |
3 This page should describe all relevant information on any developer who has or will create any functionality on |
5 This page should describe all relevant information on any developer who has or will create any functionality on |
4 top of the ConE functionality. |
6 top of the ConE functionality. |
5 |
7 |
6 |
8 ConE in SF |
7 ConE is open source |
9 ---------- |
8 ------------------- |
|
9 |
10 |
10 ConE is a open source project (Currently under Eclipse Public License v1.0), which can take contributions from anyone interested in ConE. In future the ConE |
11 ConE is a open source project (Currently under Eclipse Public License v1.0), which can take contributions from anyone interested in ConE. In future the ConE |
11 will propably be split to two separate parts; core and plugins. The core of ConE is mainly the public interface |
12 will propably be split to two separate parts; ConE *core* and ConE *plugins*. |
12 and the storage agnostic functionality of ConE. This core part is intended to be more generic and functional on |
13 |
13 any platform. The plugin part is meant for extensions of ConE that could be for example platform specific |
14 The core of ConE is mainly the public interface and the storage agnostic functionality of ConE. |
14 implementation plugins that generate output files based on the configurations. |
15 This core part is intended to be more generic and functional on any platform. |
|
16 |
|
17 The plugin part is meant for extensions of ConE that could be for example platform specific implementation plugins |
|
18 that generate output files based on the configurations. |
15 |
19 |
16 |
20 |
17 Developing ConE plugin |
21 Development environment |
18 ---------------------- |
22 ----------------------- |
|
23 The development environment requires a set of python packages, which you mostly install with easy_install after |
|
24 installation of setuptools. So you must install the necessary libraries in order to be able to do cone development. |
|
25 The best way to test whether your development environment has everything that is required is to run all the unittest |
|
26 of cone (See :ref:`cone-development-test-running`). When everything works, your environment is properly |
|
27 setup :) |
19 |
28 |
20 See :ref:`plugin-howto`. |
29 **Required Python packages** |
|
30 - jinja2 |
|
31 - simplejson |
|
32 - lxml (at least version 2.2.2) run easy_install lxml==2.2.2 |
|
33 - nose (for running testing) |
|
34 - epydoc (for documentation generation) |
|
35 - sphinx (for documentation generation) |
|
36 |
|
37 |
|
38 To install the above packages, run easy_install |
21 |
39 |
22 |
40 |
|
41 easy_install call:: |
|
42 |
|
43 easy_install <package-name> |
|
44 |
|
45 easy_install jinja2 package:: |
|
46 |
|
47 easy_install jinja2 |
|
48 |
|
49 |
|
50 .. _cone-development-test-running: |
|
51 |
|
52 Running tests |
|
53 ------------- |
|
54 The different packages inside cone have a tests subpackage which contains all the tests for that particular package. |
|
55 Each package also contains a runtests.py file that runs all tests inside that package with `nose <http://somethingaboutorange.com/mrl/projects/nose/0.11.3/>`_. |
|
56 |
|
57 The higher levels packages also contain a runtests.py which also collect all subpackage tests, so you can basically |
|
58 run every test of cone source by running the runtests.py at the root of source directory. |
|
59 |
|
60 **Setting PYTHONPATH** |
|
61 |
|
62 The cone modules need to be set to the PYTHONPATH to enable test running. If you are using eclipse with PyDev as |
|
63 developement environment, the PYTHONPATH should be automatically correct as the eclipse .project file is included |
|
64 in version control. |
|
65 |
|
66 For command line testing you can run the testing_paths.cmd/testing_paths.sh to set the PYTHONPATH correctly. |
|
67 After that you should be able to run individual test are all test with a normal python call . |
|
68 |
|
69 running all cone tests:: |
|
70 |
|
71 cd source |
|
72 python runtests.py |
|
73 |
|
74 |
|
75 running individual unittest example:: |
|
76 |
|
77 cd source/cone/public/tests |
|
78 python unittest_configuration.py |
|
79 |
|
80 running all module tests:: |
|
81 |
|
82 cd source/cone/public/tests |
|
83 python runtests.py |
|
84 |
|
85 |
|
86 running tests with nose:: |
|
87 |
|
88 Tests can also be run with nose, effectively this is the same as running the runtests.py |
|
89 |
|
90 cd source/cone/ |
|
91 nosetests --include=unittest |
|
92 |
23 Using ConE API |
93 Using ConE API |
24 ============== |
94 -------------- |
25 |
95 |
26 .. toctree:: |
96 .. toctree:: |
27 :maxdepth: 2 |
97 :maxdepth: 2 |
28 |
98 |
29 api/api |
99 api/api |
30 rule |
|
31 |
|
32 |
|