/osler

The SNHC's patient tracking and clinic tools.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Circle CI codecov.io

The SNHC is closed as of April 2020. No further work will occur on this fork. See here for a maintained fork.

Osler

This is our osler project, which is a collection for all our patient tracking. It's a django project.

Running locally

First, clone our repository

git clone https://github.com/SaturdayNeighborhoodHealthClinic/osler.git

Next, get pip.

We also recommend running Osler in a virtual environment. If you're going to run our project in a virtual env do th following:

pip install virtualenv
virtualenv venv --python=python2.7
source venv/bin/activate

Then use pip install our dependencies.

If you are trying to make a development build run:

pip install -r requirements-dev.txt

For a deployment build run:

pip install -r requirements.txt

(Python dependencies are stored in requirements-dev.txt for a development build and in requirements.txt for a deployment build)

One of our dependencies is Pillow, which requires some other libraries.

Once you've done that, from the osler/ build the test database with

sh scripts/reset_db.sh

This script is also used to rebuild the test database after making database changes require migrations. Then, you can run the project in debug mode with

python manage.py runserver --settings osler.debug_settings

Once you have it running, you should be able to log into the debug database-backed app with the user 'jrporter' with password 'password'.

To run tests, run

python manage.py test

Remote servers without GUI access may need to configure headless selenium. A pretty good tutorial on doing this in the cloud is here.

Deployment

There a lot of good resources that teach you how to deploy a django app, and there are many ways to do it correctly. There's nothing too special about Osler in this regard! However, we strongly recommmend nginx, gunicorn, and postgres.