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