30c16d6ad8ec56c50833de58570272df13090655
[xnet] / doc / setup.rst
1 New developer setup
2 ===================
3
4 This document should guide a new developer through his initial setup of platal2.
5
6
7 Getting the code
8 ----------------
9
10 You should fetch the git repository:
11
12 - Readonly, from git://git.polytechnique.org/xnet.git
13 - Read/write, from git.polytechnique.org:/home/git/xnet.git
14
15 .. code-block:: sh
16
17     cd ~/dev
18     git clone x1829vaneau@murphy.polytechnique.org:/home/git/xnet.git
19
20
21 Installing dependencies
22 -----------------------
23
24 First, install required (system) packages:
25
26 * Python2.7 (with sqlite support)
27 * virtualenv (or virtualenvwrapper)
28
29 Then, you can create your virtualenv.
30 It will host a dedicated Python installation, with all required dependencies,
31 without affecting the rest of your setup.
32
33 .. code-block:: sh
34
35     virtualenv ~/dev/xnet_venv
36     . ~/dev/xnet_venv/bin/activate
37
38 Now, install the dependencies:
39
40 .. code-block:: sh
41
42     cd ~/dev/xnet
43     pip install -r requirements.txt -r dev_requirements.txt
44
45
46 Setting up the database
47 -----------------------
48
49 The development database is backed by sqlite, and should work out of the box:
50
51 .. code-block:: sh
52
53     cd ~/dev/xnet
54     . ~/dev/xnet_venv/bin/activate
55
56     make resetdb
57
58
59 You may now populate your database with some development data:
60
61 .. code-block:: sh
62
63     ./manage.py loadatasets dev
64
65
66 Testing the system
67 ------------------
68
69 The simplest way to test the system is to start the built-in HTTP server:
70
71 .. code-block:: sh
72
73     make run
74
75 Now, open your browser on http://localhost:8000/, you should see the base page.
76
77