Skip to content

NSSAC/PEpiTA

Repository files navigation

DOI

PEpiTA

Phase-based Epidemic Time series Analyzer.

1. Install required packages

We recommend using conda (E.g. miniconda or micromamba) to both install a compatible Python version, along with the dependencies.

micromamba env create --file environment.yml
# if you want to add some dev tools, like maybe Jupyter Lab to run the notebook
micromamba install --name pepita --file environment_dev_addon.yml

If you wish to try installing with pip (preferably, at least, in a virtual environment), you can take a look at the conda env files (environment.yml, environment_dev_addon.yml) to see what you'll need.


2. Running Server on localhost

Open a terminal in the PEpiTA folder and follow these commands:

micromamba activate pepita
cd webdesign
python manage.py migrate # if running for the first time
python manage.py runserver

After executing all the above commands you will be able to see a message like this:

Django version 4.2, using settings 'webdesign.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Now open a browser and go to http://localhost:8000/ or http://127.0.0.1:8000/

You can, alternatively, test how the production webserver runs it, using gunicorn to handle multiple requests.

# cd webdesign
gunicorn --bind ":8000" webdesign.wsgi

Then connect via http://0.0.0.0:8000.


3. Headless Implementation

workflow_notebook.ipynb shows the implementation of all the python scripts in a Jupyter Notebook.

You can also try running with Docker.