Improve docs.
[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 .. note:: The provided Makefile holds a few helpful commands.
60           Use ``make help`` to get a list of available commands.
61
62
63 You may now populate your database with some development data:
64
65 .. code-block:: sh
66
67     ./manage.py loadatasets dev
68
69
70 Testing the system
71 ------------------
72
73 The simplest way to test the system is to start the built-in HTTP server:
74
75 .. code-block:: sh
76
77     make run
78
79 Now, open your browser on http://localhost:8000/, you should see the base page.
80
81