Skip to content
The base Rapidsms project for afrims
Python JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
afrims
requirements
services
.gitignore
API.txt
README.rst
TODO.txt
bootstrap.py
fabfile.py

README.rst

TrialConnect

The RapidSMS TrialConnect project. A system for supporting clinical trials with SMS reminders and outreach.

Development Workflow

We are using git-flow to help manage our development process.

Learn how to use git-flow at:
http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
You can download and install git-flow from:
https://github.com/nvie/gitflow
Learn more about the methodology behind it at:
http://nvie.com/posts/a-successful-git-branching-model/

Developer Setup

Prerequisites:

  • A Linux-based development environment including Python 2.6. Ubuntu 10.04 or later is recommended. At present, Windows-based environments are not actively supported.

  • PostgreSQL and the appropriate Python bindings (psycopg2). In Debian-based distributions, you can install these using apt-get, e.g.:

    sudo apt-get install postgresql python-psycopg2 libpq-dev
    
  • The following additional build dependencies:

    sudo apt-get install libxslt1-dev libxml2-dev
    
  • CouchDB is required for logging and audit tracking purposes:

    sudo apt-get install couchdb
    
See
http://wiki.apache.org/couchdb/Installing_on_Ubuntu

for more information about couch.

  • Install pip and virtualenv, and make sure virtualenv is up to date, e.g.:

    easy_install pip
    pip install -U virtualenv
    pip install -U virtualenvwrapper
    
  • Install git-flow (see above).

To setup a local development environment, follow these steps:

  1. Clone the code from git, checkout the develop branch, and initialize git-flow:

    git clone git@github.com:afrims/afrims.git
    cd afrims
    git checkout develop
    git flow init # just accept all the default answers
    
  2. Create a Python virtual environment for this project:

    mkvirtualenv --distribute afrims-dev
    workon afrims-dev
    
  3. Install the project dependencies into the virtual environment:

    ./bootstrap.py
    
  4. Create local settings file and initialize a development database:

    cp localsettings.py.example localsettings.py
    createdb afrims_devel
    ./manage.py syncdb
    
  5. Update the submodules:

    git submodule init
    git submodule update
    
  6. In one terminal, start RapidSMS router:

    mkdir logs
    ./manage.py runrouter
    
  7. In another terminal, start the Django development server:

    ./manage.py runserver
    
  8. Open http://localhost:8000 in your web browser and you should see an Installation Successful! screen.

Production Setup

  1. Sync the production server with network (or otherwise correct) time e.g. using NTP.
  2. Set the TIME_ZONE setting in Django to reflect the right time zone.
  3. Specify the default language for SMS (where?)
  4. Update the django EMAIL settings so that email reports don't get sent from webmaster@localhost
Something went wrong with that request. Please try again.