/drone-simulation

From the paper: https://doi.org/10.1016/j.resuscitation.2021.03.012

Primary LanguagePython

drone-simulation

An app to simulate time saved when sending a drone flying with an AED to an OHCA (Out of Hospital Cardiac Arrest).

Installation

Install all requirements using pip:

pip install .

Run

To run the app, just start the Dash server:

python index.py

And then you can access it at the address http://127.0.0.1:8050/en/.

Docker

If you don't want to pollute your main OS, you can also build and run inside a docker container:

docker-compose up -d server

Check styles

Run the linters in your editor (pycodestye and pylint), or directly in a Docker container.

docker-compose build test

Update Translations

To generate the messages to translate, run:

docker-compose run --rm test pybabel extract . -o messages.pot
docker-compose run --rm test pybabel update -i messages.pot -d locales -l fr

Then update the file locales/fr/LC_MESSAGES/messages.po by translating new strings.

Publish on Google Cloud

You first need to get your account authorized for the project, then install gcloud, then run:

docker build --target prod -t eu.gcr.io/drone-simulation/server .
docker push eu.gcr.io/drone-simulation/server
gcloud beta run deploy --image eu.gcr.io/drone-simulation/server --platform managed --project drone-simulation

See the result here.