Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

MITLibraries/tryiiif

Repository files navigation

Build Status

Dependency Status

Apache 2 licensed

TryIIIF

http://tryiiif.herokuapp.com

Develop

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 example redis://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 logging
  • FLASK_ENV: Optional string to identify where flask is running, for example production
  • 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

Running Tests

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