Repository for Delineo Disease Modeling at the Johns Hopkins University.
Choose one of the below, either a local dev environment or a Conda environment.
- Ensure you have
python3.8
installed and set up. - Clone this repository.
- Initialize a virtual environment:
python3.8 -m venv ~/.envs/PandemicModel
. (Consider usingvirtualenvwrapper
for steps 3-4) - Activate the virtual environment:
source ~/.envs/PandemicModel/bin/activate
. - Install dependencies:
pip install -r requirements.txt
.
- In the Anaconda CMD.exe Prompt, create a new environment with
conda create -n myenv python=3.9.1
, wheremyenv
is the name of the environment. Python version 3.9.1 is what's up and running on the covidmod server so it's a good choice to use for your conda environment. - Activate the conda environment with
conda activate myenv
. - Clone this repository.
- Navigate into the PandemicModel folder and run
pip install -r requirements.txt
.
For both, the best way to verify everything is working is to navigate into the simulation
folder and try running python master.py
. If you get a bunch of numbers spit out to your terminal, then you're all set.
- Most likely, you will run into issues due to some dependency not being installed in your conda environment/virtual env. Check ClickUp and/or Slack for a full list of working dependencies.
- If you get an error along the lines of
synthpops has no attribute 'validate'
inpopulation.py
, open up an editor and uncomment the first synthpops import, and comment the second one out.
- Please do not commit
venv
stuff. - If you
pip install
anything, remember topip freeze > requirements.txt
before committing any changes. - You cannot commit to the
master
branch, remember to commit all changes to a new branch and open a PR when you're ready to merge.
All important files for running are in the /simulation folder
simulation/diseasedata: contains comorbidity data
simulation/synthpops: DO NOT TOUCH unless you really know what you're doing
simulation/master.py: runs the simulation- call this file on command line to get a result