Project Installation
Version 5 (Etienne Pallier, 03/24/2016 12:50 pm)
1 | 1 | Etienne Pallier | h1. Project Installation |
---|---|---|---|
2 | 1 | Etienne Pallier | |
3 | 3 | Etienne Pallier | --- |
4 | 3 | Etienne Pallier | |
5 | 1 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}TODO% |
6 | 1 | Etienne Pallier | |
7 | 1 | Etienne Pallier | * Mettre en place une collaboration via le gitlab |
8 | 1 | Etienne Pallier | |
9 | 1 | Etienne Pallier | * Séparation des BD Django et Pyros |
10 | 1 | Etienne Pallier | |
11 | 1 | Etienne Pallier | * Intégration des modules Django déjà développés |
12 | 1 | Etienne Pallier | |
13 | 1 | Etienne Pallier | * Intégration continue avec Jenkins (+ run des tests sur une VM Windows) |
14 | 1 | Etienne Pallier | |
15 | 1 | Etienne Pallier | * Planifier la suite... |
16 | 1 | Etienne Pallier | |
17 | 1 | Etienne Pallier | * Doc pour le meeting de mai |
18 | 3 | Etienne Pallier | |
19 | 3 | Etienne Pallier | --- |
20 | 2 | Etienne Pallier | |
21 | 2 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}LIENS UTILES% |
22 | 2 | Etienne Pallier | |
23 | 2 | Etienne Pallier | * Liens vers web local : |
24 | 2 | Etienne Pallier | |
25 | 2 | Etienne Pallier | * homepage: http://localhost:8000 |
26 | 2 | Etienne Pallier | * admin: http://localhost:8000/admin |
27 | 2 | Etienne Pallier | |
28 | 2 | Etienne Pallier | * Django: |
29 | 2 | Etienne Pallier | |
30 | 2 | Etienne Pallier | * Coding style: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/ |
31 | 2 | Etienne Pallier | |
32 | 2 | Etienne Pallier | * Git docs: |
33 | 2 | Etienne Pallier | |
34 | 2 | Etienne Pallier | * https://git-scm.com/docs |
35 | 2 | Etienne Pallier | * https://git-scm.com/book/fr/v1/Les-bases-de-Git-Travailler-avec-des-d%C3%A9p%C3%B4ts-distants |
36 | 2 | Etienne Pallier | * les workflows: https://aresu.dsi.cnrs.fr/spip.php?article219 |
37 | 2 | Etienne Pallier | * Git for Eclipse users : http://wiki.eclipse.org/EGit/Git_For_Eclipse_Users |
38 | 2 | Etienne Pallier | |
39 | 2 | Etienne Pallier | * CADOR web interface: http://cador.obs-hp.fr/ros/manual/cador_actions.html |
40 | 2 | Etienne Pallier | |
41 | 2 | Etienne Pallier | * pylint (analyse de code) : https://www.pylint.org |
42 | 2 | Etienne Pallier | |
43 | 2 | Etienne Pallier | * pyreverse (uml diagrams generation, inclus dans pylint) : https://www.logilab.org/blogentry/6883 |
44 | 2 | Etienne Pallier | |
45 | 2 | Etienne Pallier | * tox (a generic virtualenv management and test command line tool) : https://testrun.org/tox/latest/index.html |
46 | 2 | Etienne Pallier | |
47 | 2 | Etienne Pallier | --- |
48 | 4 | Etienne Pallier | |
49 | 4 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}I - DATABASE SCHEMA (v0.2.1)% |
50 | 4 | Etienne Pallier | |
51 | 4 | Etienne Pallier | |
52 | 4 | Etienne Pallier | {{thumbnail(PYROS_PDM_v021.png, size=300, title=Pyros data model)}} |
53 | 4 | Etienne Pallier | |
54 | 4 | Etienne Pallier | |
55 | 4 | Etienne Pallier | --- |
56 | 5 | Etienne Pallier | |
57 | 5 | Etienne Pallier | h2. %{margin-left:0px; font-weight:bold; font-size:25px; display:block; color:red;}II - Get the project (from gitlab)% |
58 | 5 | Etienne Pallier | |
59 | 5 | Etienne Pallier | h3. Gitlab management interface |
60 | 5 | Etienne Pallier | |
61 | 5 | Etienne Pallier | https://gitlab.irap.omp.eu/epallier/pyros |
62 | 5 | Etienne Pallier | |
63 | 5 | Etienne Pallier | https://gitlab.irap.omp.eu/epallier/pyros/team |
64 | 5 | Etienne Pallier | |
65 | 5 | Etienne Pallier | Browse the code: https://gitlab.irap.omp.eu/epallier/pyros/tree/master |
66 | 5 | Etienne Pallier | |
67 | 5 | Etienne Pallier | h3. Project structure |
68 | 5 | Etienne Pallier | |
69 | 5 | Etienne Pallier | Once you have fetched the project, you should obtain this structure: |
70 | 5 | Etienne Pallier | |
71 | 5 | Etienne Pallier | <pre> |
72 | 5 | Etienne Pallier | |
73 | 5 | Etienne Pallier | PYROS/ |
74 | 5 | Etienne Pallier | ├── install/ |
75 | 5 | Etienne Pallier | │ └── REQUIREMENTS.txt |
76 | 5 | Etienne Pallier | │ └── INSTALLATION.txt |
77 | 5 | Etienne Pallier | ├── public/ |
78 | 5 | Etienne Pallier | │ └── static/ |
79 | 5 | Etienne Pallier | ├── src/ |
80 | 5 | Etienne Pallier | │ ├── manage.py |
81 | 5 | Etienne Pallier | │ ├── pyros/ |
82 | 5 | Etienne Pallier | │ │ ├── __init__.py |
83 | 5 | Etienne Pallier | │ │ ├── __pycache__ |
84 | 5 | Etienne Pallier | │ │ ├── settings.py |
85 | 5 | Etienne Pallier | │ │ ├── urls.py |
86 | 5 | Etienne Pallier | │ │ └── wsgi.py |
87 | 5 | Etienne Pallier | │ └── pyrosapp/ |
88 | 5 | Etienne Pallier | │ ├── __init__.py |
89 | 5 | Etienne Pallier | │ ├── admin.py |
90 | 5 | Etienne Pallier | │ ├── apps.py |
91 | 5 | Etienne Pallier | │ ├── migrations |
92 | 5 | Etienne Pallier | │ ├── models.py |
93 | 5 | Etienne Pallier | │ ├── tests.py |
94 | 5 | Etienne Pallier | │ └── views.py |
95 | 5 | Etienne Pallier | |
96 | 5 | Etienne Pallier | |
97 | 5 | Etienne Pallier | </pre> |
98 | 5 | Etienne Pallier | |
99 | 5 | Etienne Pallier | h3. From the terminal |
100 | 5 | Etienne Pallier | |
101 | 5 | Etienne Pallier | <pre> |
102 | 5 | Etienne Pallier | git clone https://gitlab.irap.omp.eu/epallier/pyros.git PYROS |
103 | 5 | Etienne Pallier | (or also : git clone git@gitlab.irap.omp.eu:epallier/pyros.git PYROS) |
104 | 5 | Etienne Pallier | </pre> |
105 | 5 | Etienne Pallier | |
106 | 5 | Etienne Pallier | This creates a PYROS/ folder containing the project (with a .git/ subfolder for synchronization with the git repository) |
107 | 5 | Etienne Pallier | |
108 | 5 | Etienne Pallier | _If you just wanted a static copy of the project (without synchronization), just remove the .git/ folder:_ |
109 | 5 | Etienne Pallier | <pre> |
110 | 5 | Etienne Pallier | $ rm -r .git/ |
111 | 5 | Etienne Pallier | </pre> |
112 | 5 | Etienne Pallier | |
113 | 5 | Etienne Pallier | h3. From Eclipse |
114 | 5 | Etienne Pallier | |
115 | 5 | Etienne Pallier | 1) Deactivate CA certificate verification |
116 | 5 | Etienne Pallier | |
117 | 5 | Etienne Pallier | Window -> Preferences -> Team -> git -> configuration -> Add entry |
118 | 5 | Etienne Pallier | |
119 | 5 | Etienne Pallier | Key = http.sslVerify |
120 | 5 | Etienne Pallier | Value = false |
121 | 5 | Etienne Pallier | |
122 | 5 | Etienne Pallier | 2) Fetch the project |
123 | 5 | Etienne Pallier | |
124 | 5 | Etienne Pallier | File/Import project from git |
125 | 5 | Etienne Pallier | |
126 | 5 | Etienne Pallier | Select repository source: Clone URI: https://gitlab.irap.omp.eu/epallier/pyros.git |
127 | 5 | Etienne Pallier | |
128 | 5 | Etienne Pallier | Directory: |
129 | 5 | Etienne Pallier | par défaut, il propose : /Users/epallier/git/pyros |
130 | 5 | Etienne Pallier | mais on peut le mettre ailleurs (c'est ce que j'ai fait) |
131 | 5 | Etienne Pallier | |
132 | 5 | Etienne Pallier | initial branch: master |
133 | 5 | Etienne Pallier | remote name: origin |
134 | 5 | Etienne Pallier | |
135 | 5 | Etienne Pallier | Import as general project |
136 | 5 | Etienne Pallier | |
137 | 5 | Etienne Pallier | Project name: PYROS |
138 | 5 | Etienne Pallier | |
139 | 5 | Etienne Pallier | |
140 | 5 | Etienne Pallier | 3) Configure the project |
141 | 5 | Etienne Pallier | |
142 | 5 | Etienne Pallier | The project is created. Now, you have to set it as a «PyDev » and a « Django » project. |
143 | 5 | Etienne Pallier | |
144 | 5 | Etienne Pallier | clic droit sur le projet / PyDev / set as a PyDev project |
145 | 5 | Etienne Pallier | |
146 | 5 | Etienne Pallier | clic droit sur le projet / PyDev / set as a Django project |
147 | 5 | Etienne Pallier | |
148 | 5 | Etienne Pallier | clic droit sur le projet : on doit maintenant avoir un sous-menu Django |
149 | 5 | Etienne Pallier | |
150 | 5 | Etienne Pallier | clic droit sur le dossier src / PyDev / set as source folder (add to PYTHONPATH) |
151 | 5 | Etienne Pallier | |
152 | 5 | Etienne Pallier | clic droit sur projet / Properties / Pydev-Django : |
153 | 5 | Etienne Pallier | - Django manage.py : src/manage.py |
154 | 5 | Etienne Pallier | - Django settings module : pyros.settings |
155 | 5 | Etienne Pallier | |
156 | 5 | Etienne Pallier | |
157 | 5 | Etienne Pallier | 4) Set Code style |
158 | 5 | Etienne Pallier | |
159 | 5 | Etienne Pallier | Window/Preferences : Pydev / Editor |
160 | 5 | Etienne Pallier | - Auto Imports : uncheck « Do auto import » |
161 | 5 | Etienne Pallier | - Code style: |
162 | 5 | Etienne Pallier | - Locals … : camelCase |
163 | 5 | Etienne Pallier | - Methods : camelCase() with first lower |
164 | 5 | Etienne Pallier | - Code style / Code Formatter: activer « use autopep8.py for code formatting » |
165 | 5 | Etienne Pallier | - Tabs : Tab length : 4 |
166 | 5 | Etienne Pallier | |
167 | 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) |