Skip to content

A Django web interface to the package value-of-information, based on a task queue.

Notifications You must be signed in to change notification settings

tadamcz/value_of_information_webapp

Repository files navigation

A Django app that acts as a wrapper around the package value-of-information (tadamcz/value-of-information). That package is included as a git submodule, and listed in pyproject.toml as a local dependency in editable mode.

Queries take from a few seconds to many minutes to execute. Therefore, they are sent to a task queue (based on Django-Q). Once a query completes, the results are displayed in the browser.

The initial skeleton was set up using Cookiecutter Django. See README_cookiecutter.md.

The best entrypoint into the code is probably views.py.

Deployment

Deployed using Dokku, an open source and customisable alternative to PaaS such as Heroku. It's currently deployed on an AWS EC2 instance. The files used by Dokku are .buildpacks, .env, and app.json.

Local development

Installation

git clone --recurse-submodules git@github.com:tadamcz/value_of_information_webapp.git
poetry install
poetry run python manage.py migrate # uses SQLite locally

Execution

The application uses a task queue. The workers processing the tasks need to be started separately with manage.py qcluster.

# In a first shell
poetry run python manage.py qcluster

# In another shell
poetry run python manage.py runserver

Origin of this project

This tool was developed under contract for Open Philanthropy. Open Philanthropy plans to use this tool as one input into the decision of whether to fund randomized trials in global health or development. Because the concept is quite general, we hope that the tool can also be useful to others.

About

A Django web interface to the package value-of-information, based on a task queue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published