Document loading dev dataset.
[xnet] / doc / setup.rst
CommitLineData
7c9fa49a
RB
1New developer setup
2===================
3
4This document should guide a new developer through his initial setup of platal2.
5
6
7Getting the code
8----------------
9
10You 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
21Installing dependencies
22-----------------------
23
24First, install required (system) packages:
25
26* Python2.7 (with sqlite support)
27* virtualenv (or virtualenvwrapper)
28
29Then, you can create your virtualenv.
30It will host a dedicated Python installation, with all required dependencies,
31without affecting the rest of your setup.
32
33.. code-block:: sh
34
35 virtualenv ~/dev/xnet_venv
36 . ~/dev/xnet_venv/bin/activate
37
38Now, 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
46Setting up the database
47-----------------------
48
49The 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
d20356b5
RB
59You may now populate your database with some development data:
60
61.. code-block:: sh
62
63 ./manage.py loadatasets dev
64
65
7c9fa49a
RB
66Testing the system
67------------------
68
69The simplest way to test the system is to start the built-in HTTP server:
70
71.. code-block:: sh
72
73 make run
74
75Now, open your browser on http://localhost:8000/, you should see the base page.
76
77