3
|
1 |
.. _cone-development:
|
|
2 |
|
|
3 |
Development with ConE
|
|
4 |
=====================
|
0
|
5 |
This page should describe all relevant information on any developer who has or will create any functionality on
|
|
6 |
top of the ConE functionality.
|
|
7 |
|
3
|
8 |
ConE in SF
|
|
9 |
----------
|
0
|
10 |
|
|
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
|
3
|
12 |
will propably be split to two separate parts; ConE *core* and ConE *plugins*.
|
|
13 |
|
|
14 |
The core of ConE is mainly the public interface and the storage agnostic functionality of ConE.
|
|
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.
|
|
19 |
|
|
20 |
|
|
21 |
Development environment
|
|
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 :)
|
|
28 |
|
|
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
|
0
|
39 |
|
|
40 |
|
3
|
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**
|
0
|
61 |
|
3
|
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
|
0
|
84 |
|
|
85 |
|
3
|
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 |
|
0
|
93 |
Using ConE API
|
3
|
94 |
--------------
|
0
|
95 |
|
|
96 |
.. toctree::
|
|
97 |
:maxdepth: 2
|
|
98 |
|
|
99 |
api/api
|