Skip to content
forked from coyote-team/coyote

Image annotation site and API to enable the distributed annotation of museum images.

License

Notifications You must be signed in to change notification settings

llinneaa/coyote

Repository files navigation

Coyote

Travis CI Code Climate Test Coverage

An open source image annotation app and API to enable the distributed annotation of museum images. Coyote is built on Ruby-on-Rails with MySQL (via MariaDB).

The software was developed by the Museum of Contemporary Art Chicago to support a distributed workflow for describing their images and publishing those descriptions to the web. See coyote.pics for an example annotation.

Coyote offers role-based logins to facilitate image description tasks. Administrators approve, assign, and review descriptions. Cataloguers create descriptions from an assignment queue or select images to describe. To provide additional context for cataloguers, Coyote presents the image caption, where available. Coyote allows multiple cataloguers to describe an image; it also allows a single cataloguer to create multiple description– potentially in multiple languages –of the same image.

More information about image description projects at the MCA and elsewhere is available at coyote.pics, along with contact information for the project team. You can also view or hear image descriptions on the MCA website.

Developer Setup

# installs gems, walks you through setting .env variables, creates databases, and adds seed data
bin/setup
bin/rails server && open http://localhost:3000

The seed script builds a simple user, so you can login as [email protected].

Documentation

Our YARD documentation is hosted at [coyote-team.github.io][https://coyote-team.github.io/coyote/].

Quick Server Setup

  1. Determine the values for .env.example and .env.production.example.
  2. Point a domain towards the server coyote, e.g. coyote.warhol.org.
  3. Run this one liner as the root user on a 16.04 Ubuntu server to install and start coyote:
wget -qO- https://raw.githubusercontent.com/coyote-team/coyote/master/bin/install.sh | bash

Secure credentials are kept untracked in .env and .env.[development, test, staging, production].

For more information on environment or setup, see bin/install.sh or the Vagrantfile.

Usage

# Run the server
bin/rails s

# Automatically run tests as you work. You might need to install a shim for guard.
guard

# Run the tests on their own
bin/rspec

# Run the console
bin/rails c

Test

Lint the model factories (more info):

bin/rake factory_girl:lint

Then, run the test suite:

# Once
bin/rspec

# Or dynamically via the guard daemon
bundle exec guard

# Leave that running while your server is running and
# then press enter or update a page and the test suite will run

Deploy

# This command will also copy your .env and .env.production to the server
bundle exec cap production deploy

Update website images

This uses each website's strategy (see below)

# Update images from past 2 minutes on local
bin/rake websites:update
# Update images from past 60 minutes on local
bin/rake websites:update[60]
# Update images from past 60 minutes on production
TASK="websites:update[60]" bundle exec cap production rake

Vagrant Setup

Some folks like to use an enclosed dev environment. Here's a virtual machine dev environment that can be run with the open source engine vagrant. This approach can reduce your dev setup time.

Install vagrant and run vagrant up Then, you can view the site like so:

vagrant up
ssh -N -L 3000:localhost:3000 vagrant@localhost -p 2222 
# Vagrant is the password
# In another terminal
open http://localhost:3000

Docker Setup

This is work-in-progress. See docker-compose.yml.

API

API documentation is generated at /apipie and you can see MCA's version here.

Strategies

We can extend the functionality of Coyote to better integrate with your particular CMS with a strategy file. For an example, check out /lib/coyote/strategies/mca.rb

Components

Data model

Data model

For use on nomnoml

[<frame>Coyote data model|
  [User | id: int | first_name: string | last_name: string |  email: string | admin: bool ]
  [Image | id: int |url : string | canonical_id: string | priority: boolean | title: text | page_urls: text]
  [Tag | id: int | title: string]
  [Group | id: int | title: string]
  [Description | id: int | locale:str(en) | text: text | license:str(cc0-1.0)]
  [Website | id: int | url: string | title: string | strategy: string ]
  [Status | id: int | title: string | description: text]
  [Metum| id: int| title: string | instructions: text]

  [Assignment]->[Image]
  [Assignment]->[User]

  [Description]->[User]
  [Description]->[Metum]
  [Description]->[Status]

  [Image]->[Group]
  [Image]->[Website]
  [Image] +-> 0..* [Description]
  [Image] +-> 0..* [Tag]
]

Descriptions have an audit log that tracks changes across most columns.

Links

More info regarding accessibility:

Coyote Admin

Versus

Contributors

License

MPLv2

About

Image annotation site and API to enable the distributed annotation of museum images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 75.9%
  • Sass 9.4%
  • Slim 9.4%
  • JavaScript 3.5%
  • HTML 1.1%
  • Shell 0.5%
  • Dockerfile 0.2%