README.md 3.41 KB
Newer Older
Thomas Frion's avatar
Thomas Frion committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# CHOUCAS Project

Over 15000 mountain rescue request by year are recorded in France. The Pelotons de Gendarmerie de Haute Montagne (PGHM) are the main mountain rescue teams.
In this context, CHOUCAS project aims to provide methods and tools to make and improve geographic data from different sources, and thinking models to help the decision process of locating victims in mountainous environment. The goal is to improve the response alert capability.

Following principles of CHOUCAS project, the application will be rewritten.

The application aims to connect:
* The applicant: person who launch the alert, who could be the victim or a third party.
*  The rescue team

The objective of this relation is to get the victim' localization from a manual research of geographic hints from different data sources as well as on the knowledge of the rescue team. This hint research is part of a process of reasoning, which consists of formulating hypotheses based on the initial information provided by the applicant, refining them gradually through dialogue and data analysis, and then deducing the most probable location of the victim.

The rescue application will therefore also have the task of assisting in locating the victim by providing the tools to manage the data necessary for the rescuers' decision-making: multi-source data (institutional or community data) and multi-format data (maps, topo-guides for hikes in paper format, vector data).

This application, although the initiative of the Grenoble PGHM, should have a national scope so that all PGHMs in France can use it.

Thomas Frion's avatar
Thomas Frion committed
18
19
> In this repo, the master branch contains the **lastest stable** version of the code. The real lastest version of the code (but **not necessarily stable**) is in the dev branch.

Thomas Frion's avatar
Thomas Frion committed
20
21
22
23
## Installation

### Requirements

24
25
#### Back-end

Thomas Frion's avatar
Thomas Frion committed
26
27
28
29
30
31
* PosgreSQL
* Postgis
* Python3
* Pip
* Virtualenv

32
33
34
35
36
37
38
#### Front-end

* NodeJs
* Angular/Cli

> To install Angular Cli, type this command `npm install -g @angular/cli`

Thomas Frion's avatar
Thomas Frion committed
39
### Installation (Back-end)
Thomas Frion's avatar
Thomas Frion committed
40
41
42

#### 1. Project init
```bash
Thomas Frion's avatar
Thomas Frion committed
43
44
$ git clone git@gricad-gitlab.univ-grenoble-alpes.fr:Projets-INFO4/19-20/8/app-pghm.git
$ cd app-pghm/choucas
Thomas Frion's avatar
Thomas Frion committed
45
46
47
48
49
50
51
52
53
54
$ source bin/activate
$ cd choucas
$ pip install -r requirements.txt
```

If is necessay, edit the setting file (`choucas/settings.py`) for database connection.

#### 2. Database creation

```bash
Thomas Frion's avatar
Thomas Frion committed
55
$ python manage.py makemigrations
Thomas Frion's avatar
Thomas Frion committed
56
57
58
$ python manage.py migrate
```

Thomas Frion's avatar
Thomas Frion committed
59
60
61
62
63
64
65
66
Now you have to create a super user:

```bash
$ python manage.py createsuperuser
```


#### 3. Load data (optional)
Thomas Frion's avatar
Thomas Frion committed
67

Thomas Frion's avatar
Thomas Frion committed
68
69
This part allows you to load test data or data to initialize the database.

Thomas Frion's avatar
Thomas Frion committed
70
```bash
Thomas Frion's avatar
Thomas Frion committed
71
$ python manage.py loaddata pghm/fixtures/xxxx.json
Thomas Frion's avatar
Thomas Frion committed
72
73
74
75
76
77
78
```

#### 4. Run server

```bash
$ python manage.py runserver
```
Thomas Frion's avatar
Thomas Frion committed
79

Thomas Frion's avatar
Thomas Frion committed
80
81
82
83
84
### Installation (Front-end)

#### 1. Setup

```bash
Thomas Frion's avatar
Thomas Frion committed
85
$ git clone git@gricad-gitlab.univ-grenoble-alpes.fr:Projets-INFO4/19-20/8/app-pghm.git
Thomas Frion's avatar
Thomas Frion committed
86
87
$ cd app-pghm/GendLoc
$ npm install
Alexandra Chaton's avatar
Alexandra Chaton committed
88
$ npm install -g @angular/cli
Thomas Frion's avatar
Thomas Frion committed
89
90
91
92
93
94
95
96
97
98
99
100
101
102
```

#### 2. Run 

```bash
$ npm start
```

Or

```bash
$ ng serve
```

Thomas Frion's avatar
Thomas Frion committed
103
104
### Troubleshooting

Thomas Frion's avatar
Thomas Frion committed
105
106
#### Version issue of libgeos

Thomas Frion's avatar
Thomas Frion committed
107
If there is an error that is raised due to a version problem we advise you to read this [snippet](https://gricad-gitlab.univ-grenoble-alpes.fr/Projets-INFO4/19-20/8/app-pghm/snippets/167)
Thomas Frion's avatar
Thomas Frion committed
108
109
110
111

#### pg_config is missing

If during installation you get an error saying that pg_config is missing, just install the `postgresql-devel` package. Source [Stackoverflow](https://stackoverflow.com/questions/11618898/pg-config-executable-not-found)