Skip to content

sciris/hiptool

Repository files navigation

HIPtool

The HIPtool, a.k.a. Health Interventions Prioritization Tool, is a tool for helping optimize health services.

Quick start guide

  1. Install hiptool by typing python setup.py develop in the root folder.

  2. (Optional) If you want to test, run python3 -i tests/example.py. This should bring up several plots.

  3. Change to the client subfolder and type fullrun.

  4. If it worked, go to localhost:8091 in your browser to use the webapp. You can log in with username demo, password demo.

Slow start guide

  1. Clone the hiptool repository (yes, this one!).

  2. Install hiptool by typing python setup.py develop in the root folder.

  3. Test that you can import it by typing import hiptool, e.g.

>>> import hiptool
ScirisWeb 0.12.7 (2019-05-23) -- (c) Sciris.org
DataStore loaded at redis://127.0.0.1:6379/5 with temp folder /tmp/tmpheuwzdt0
HIPtool 2.0.1 (2019-05-21)
>>>
  1. Test that plotting works with python3 -i scripts/example.py, which should bring up several graphs.

  2. To build and start the webapp, change to the bin folder, and type python run.py. Note: this will take a lot of time (up to 15 min), especially on a first run!

  3. If it worked, you can go to localhost:8091 in your browser and see the HIPtool webapp.

  4. If it didn't work, try each of the steps separately:

8a. Type python install_client.py to install the JavaScript modules. You should see output like this:

your_computer:~/hiptool/bin> python install_client.py
npm WARN optional Skipping failed optional dependency /karma/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Don't worry about WARN, but do worry about ERR! If you see ERR, that means that installation failed.

8b. Type python build_client.py to build the JavaScript app. You should see output like:

static/img/ucl-logo-transparent.png    35.5 kB          [emitted]         
   static/img/world-bank-logo.png    30.7 kB          [emitted]         
  static/mpld3.v0.3.1.dev1.min.js    37.6 kB          [emitted]         

Build complete.

Tip: built files are meant to be served over an HTTP server.
Opening index.html over file:// won't work.

You should not see any warnings or errors on this step.

8c. Type python run.py to start the server running. You should see something like:

>> Webapp initialization complete (elapsed time: 0.00 s)
Matplotlib backend switched to "Agg"

    ___  ___                                                            
   / __|/ __|   ===================================================     
   \__ \ |__    ScirisApp "HIPtool" is now running on port 8091     
   |___/\___|   ===================================================     
                                                                        

  1. If that all worked, happy health-prioritizing!

Please see the README in the bin folder for more options for how to run HIPtool.

Detailed installation instructions for Windows

No known issues; please use the quick start guide above.

Detailed installation instructions for Linux

No known issues; please use the quick start guide above.

Detailed installation instructions for Mac

  1. In the root pyenv folder (see Sciris instructions), clone hiptool

  2. Install hiptool by typing python setup.py develop in the pyenv/hiptool folder.

  3. Change to the bin subfolder and type pythonw run.py.

  4. If it worked, go to localhost:8091 in your browser to use the webapp.