« Previous -
Version 5/374
(diff) -
Next » -
Current version
Etienne Pallier, 03/24/2016 12:50 pm
Project Installation¶
TODO¶
- Mettre en place une collaboration via le gitlab
- Séparation des BD Django et Pyros
- Intégration des modules Django déjà développés
- Intégration continue avec Jenkins (+ run des tests sur une VM Windows)
- Planifier la suite...
- Doc pour le meeting de mai
LIENS UTILES¶
- Liens vers web local :
- homepage: http://localhost:8000
- admin: http://localhost:8000/admin
- Django:
- Git docs:
- CADOR web interface: http://cador.obs-hp.fr/ros/manual/cador_actions.html
- pylint (analyse de code) : https://www.pylint.org
- pyreverse (uml diagrams generation, inclus dans pylint) : https://www.logilab.org/blogentry/6883
- tox (a generic virtualenv management and test command line tool) : https://testrun.org/tox/latest/index.html
I - DATABASE SCHEMA (v0.2.1)¶
II - Get the project (from gitlab)¶
Gitlab management interface¶
https://gitlab.irap.omp.eu/epallier/pyros
https://gitlab.irap.omp.eu/epallier/pyros/team
Browse the code: https://gitlab.irap.omp.eu/epallier/pyros/tree/master
Project structure¶
Once you have fetched the project, you should obtain this structure:
PYROS/ ├── install/ │ └── REQUIREMENTS.txt │ └── INSTALLATION.txt ├── public/ │ └── static/ ├── src/ │ ├── manage.py │ ├── pyros/ │ │ ├── __init__.py │ │ ├── __pycache__ │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ └── pyrosapp/ │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ ├── models.py │ ├── tests.py │ └── views.py
From the terminal¶
git clone https://gitlab.irap.omp.eu/epallier/pyros.git PYROS (or also : git clone git@gitlab.irap.omp.eu:epallier/pyros.git PYROS)
This creates a PYROS/ folder containing the project (with a .git/ subfolder for synchronization with the git repository)
If you just wanted a static copy of the project (without synchronization), just remove the .git/ folder:
$ rm -r .git/
From Eclipse¶
1) Deactivate CA certificate verification
Window -> Preferences -> Team -> git -> configuration -> Add entry
Key = http.sslVerify
Value = false
2) Fetch the project
File/Import project from git
Select repository source: Clone URI: https://gitlab.irap.omp.eu/epallier/pyros.git
Directory:
par défaut, il propose : /Users/epallier/git/pyros
mais on peut le mettre ailleurs (c'est ce que j'ai fait)
initial branch: master
remote name: origin
Import as general project
Project name: PYROS
3) Configure the project
The project is created. Now, you have to set it as a «PyDev » and a « Django » project.
clic droit sur le projet / PyDev / set as a PyDev project
clic droit sur le projet / PyDev / set as a Django project
clic droit sur le projet : on doit maintenant avoir un sous-menu Django
clic droit sur le dossier src / PyDev / set as source folder (add to PYTHONPATH)
clic droit sur projet / Properties / Pydev-Django :
- Django manage.py : src/manage.py
- Django settings module : pyros.settings
4) Set Code style
Window/Preferences : Pydev / Editor
- Auto Imports : uncheck « Do auto import »
- Code style:
- Locals … : camelCase
- Methods : camelCase() with first lower
- Code style / Code Formatter: activer « use autopep8.py for code formatting »
- Tabs : Tab length : 4
(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)