After cloning the repo, use pip to install dependencies into a virtualenv:
(tryiiif)$ pip install -r requirements.txt
Create a .env
at the root of the repo with a few settings:
REDISTOGO_URL
: Redis connection URL, for exampleredis://localhost:6379
IIIF_SERVICE_URL
: URL to the IIIF service. This should be the full URL, for example:http://example.com/iiif/2
ROLLBAR_TOKEN
: Optional https://rollbar.com token for exception loggingFLASK_ENV
: Optional string to identify where flask is running, for exampleproduction
SECRET_KEY
: Optional string to set a session secret key. This should be set in production environments. Information on how to generate and what this does here: http://flask.pocoo.org/docs/0.11/quickstart/#sessions
To run the app, you can use something like honcho from the project root:
(tryiiiif)$ honcho start
Use tox
to run the tests. The test suite requires a running instance of redis. By default, it will look for this instance at redis://localhost:6379
. If it is running at a different URL pass it as the REDISTOGO_URL
env variable to tox
. For example:
$ REDISTOGO_URL='redis://localhost:9999' tox