Project Installation
Version 8 (Etienne Pallier, 03/24/2016 12:52 pm)
1 | 1 | Etienne Pallier | h1. Project Installation |
---|---|---|---|
2 | 1 | Etienne Pallier | |
3 | 6 | Etienne Pallier | |
4 | 6 | Etienne Pallier | HOWTO Format Redmine Wiki : http://www.redmine.org/projects/redmine/wiki/FrRedmineWikiFormatting |
5 | 6 | Etienne Pallier | |
6 | 6 | Etienne Pallier | {{>toc}} |
7 | 6 | Etienne Pallier | |
8 | 6 | Etienne Pallier | |
9 | 3 | Etienne Pallier | --- |
10 | 3 | Etienne Pallier | |
11 | 4 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}I - DATABASE SCHEMA (v0.2.1)% |
12 | 4 | Etienne Pallier | |
13 | 4 | Etienne Pallier | |
14 | 4 | Etienne Pallier | {{thumbnail(PYROS_PDM_v021.png, size=300, title=Pyros data model)}} |
15 | 4 | Etienne Pallier | |
16 | 4 | Etienne Pallier | |
17 | 4 | Etienne Pallier | --- |
18 | 5 | Etienne Pallier | |
19 | 5 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}II - Get the project (from gitlab)% |
20 | 5 | Etienne Pallier | |
21 | 5 | Etienne Pallier | h3. Gitlab management interface |
22 | 5 | Etienne Pallier | |
23 | 5 | Etienne Pallier | https://gitlab.irap.omp.eu/epallier/pyros |
24 | 5 | Etienne Pallier | |
25 | 5 | Etienne Pallier | https://gitlab.irap.omp.eu/epallier/pyros/team |
26 | 5 | Etienne Pallier | |
27 | 5 | Etienne Pallier | Browse the code: https://gitlab.irap.omp.eu/epallier/pyros/tree/master |
28 | 5 | Etienne Pallier | |
29 | 5 | Etienne Pallier | h3. Project structure |
30 | 5 | Etienne Pallier | |
31 | 5 | Etienne Pallier | Once you have fetched the project, you should obtain this structure: |
32 | 5 | Etienne Pallier | |
33 | 5 | Etienne Pallier | <pre> |
34 | 5 | Etienne Pallier | |
35 | 5 | Etienne Pallier | PYROS/ |
36 | 5 | Etienne Pallier | ├── install/ |
37 | 5 | Etienne Pallier | │ └── REQUIREMENTS.txt |
38 | 5 | Etienne Pallier | │ └── INSTALLATION.txt |
39 | 5 | Etienne Pallier | ├── public/ |
40 | 5 | Etienne Pallier | │ └── static/ |
41 | 5 | Etienne Pallier | ├── src/ |
42 | 5 | Etienne Pallier | │ ├── manage.py |
43 | 5 | Etienne Pallier | │ ├── pyros/ |
44 | 5 | Etienne Pallier | │ │ ├── __init__.py |
45 | 5 | Etienne Pallier | │ │ ├── __pycache__ |
46 | 5 | Etienne Pallier | │ │ ├── settings.py |
47 | 5 | Etienne Pallier | │ │ ├── urls.py |
48 | 5 | Etienne Pallier | │ │ └── wsgi.py |
49 | 5 | Etienne Pallier | │ └── pyrosapp/ |
50 | 5 | Etienne Pallier | │ ├── __init__.py |
51 | 5 | Etienne Pallier | │ ├── admin.py |
52 | 5 | Etienne Pallier | │ ├── apps.py |
53 | 5 | Etienne Pallier | │ ├── migrations |
54 | 5 | Etienne Pallier | │ ├── models.py |
55 | 5 | Etienne Pallier | │ ├── tests.py |
56 | 5 | Etienne Pallier | │ └── views.py |
57 | 5 | Etienne Pallier | |
58 | 5 | Etienne Pallier | |
59 | 5 | Etienne Pallier | </pre> |
60 | 5 | Etienne Pallier | |
61 | 5 | Etienne Pallier | h3. From the terminal |
62 | 5 | Etienne Pallier | |
63 | 5 | Etienne Pallier | <pre> |
64 | 5 | Etienne Pallier | git clone https://gitlab.irap.omp.eu/epallier/pyros.git PYROS |
65 | 5 | Etienne Pallier | (or also : git clone git@gitlab.irap.omp.eu:epallier/pyros.git PYROS) |
66 | 5 | Etienne Pallier | </pre> |
67 | 5 | Etienne Pallier | |
68 | 5 | Etienne Pallier | This creates a PYROS/ folder containing the project (with a .git/ subfolder for synchronization with the git repository) |
69 | 5 | Etienne Pallier | |
70 | 5 | Etienne Pallier | _If you just wanted a static copy of the project (without synchronization), just remove the .git/ folder:_ |
71 | 5 | Etienne Pallier | <pre> |
72 | 5 | Etienne Pallier | $ rm -r .git/ |
73 | 5 | Etienne Pallier | </pre> |
74 | 5 | Etienne Pallier | |
75 | 5 | Etienne Pallier | h3. From Eclipse |
76 | 5 | Etienne Pallier | |
77 | 5 | Etienne Pallier | 1) Deactivate CA certificate verification |
78 | 5 | Etienne Pallier | |
79 | 5 | Etienne Pallier | Window -> Preferences -> Team -> git -> configuration -> Add entry |
80 | 5 | Etienne Pallier | |
81 | 5 | Etienne Pallier | Key = http.sslVerify |
82 | 5 | Etienne Pallier | Value = false |
83 | 5 | Etienne Pallier | |
84 | 5 | Etienne Pallier | 2) Fetch the project |
85 | 5 | Etienne Pallier | |
86 | 5 | Etienne Pallier | File/Import project from git |
87 | 5 | Etienne Pallier | |
88 | 5 | Etienne Pallier | Select repository source: Clone URI: https://gitlab.irap.omp.eu/epallier/pyros.git |
89 | 5 | Etienne Pallier | |
90 | 5 | Etienne Pallier | Directory: |
91 | 5 | Etienne Pallier | par défaut, il propose : /Users/epallier/git/pyros |
92 | 5 | Etienne Pallier | mais on peut le mettre ailleurs (c'est ce que j'ai fait) |
93 | 5 | Etienne Pallier | |
94 | 5 | Etienne Pallier | initial branch: master |
95 | 5 | Etienne Pallier | remote name: origin |
96 | 5 | Etienne Pallier | |
97 | 5 | Etienne Pallier | Import as general project |
98 | 5 | Etienne Pallier | |
99 | 5 | Etienne Pallier | Project name: PYROS |
100 | 5 | Etienne Pallier | |
101 | 5 | Etienne Pallier | |
102 | 5 | Etienne Pallier | 3) Configure the project |
103 | 5 | Etienne Pallier | |
104 | 5 | Etienne Pallier | The project is created. Now, you have to set it as a «PyDev » and a « Django » project. |
105 | 5 | Etienne Pallier | |
106 | 5 | Etienne Pallier | clic droit sur le projet / PyDev / set as a PyDev project |
107 | 5 | Etienne Pallier | |
108 | 5 | Etienne Pallier | clic droit sur le projet / PyDev / set as a Django project |
109 | 5 | Etienne Pallier | |
110 | 5 | Etienne Pallier | clic droit sur le projet : on doit maintenant avoir un sous-menu Django |
111 | 5 | Etienne Pallier | |
112 | 5 | Etienne Pallier | clic droit sur le dossier src / PyDev / set as source folder (add to PYTHONPATH) |
113 | 5 | Etienne Pallier | |
114 | 5 | Etienne Pallier | clic droit sur projet / Properties / Pydev-Django : |
115 | 5 | Etienne Pallier | - Django manage.py : src/manage.py |
116 | 5 | Etienne Pallier | - Django settings module : pyros.settings |
117 | 5 | Etienne Pallier | |
118 | 5 | Etienne Pallier | |
119 | 5 | Etienne Pallier | 4) Set Code style |
120 | 5 | Etienne Pallier | |
121 | 5 | Etienne Pallier | Window/Preferences : Pydev / Editor |
122 | 5 | Etienne Pallier | - Auto Imports : uncheck « Do auto import » |
123 | 5 | Etienne Pallier | - Code style: |
124 | 5 | Etienne Pallier | - Locals … : camelCase |
125 | 5 | Etienne Pallier | - Methods : camelCase() with first lower |
126 | 5 | Etienne Pallier | - Code style / Code Formatter: activer « use autopep8.py for code formatting » |
127 | 5 | Etienne Pallier | - Tabs : Tab length : 4 |
128 | 5 | Etienne Pallier | |
129 | 5 | Etienne Pallier | (il faudra aussi faire un peu plus loin : https://projects.irap.omp.eu/projects/pyros/wiki/Wiki#Eclipse-only-Set-the-Python3-virtual-environment-as-the-project-interpreter) |